Skip to content

Commit

Permalink
change system message text about creating a new space and stream
Browse files Browse the repository at this point in the history
  • Loading branch information
budnik9 committed Oct 30, 2023
1 parent 6042fa0 commit 0fd3b3e
Showing 1 changed file with 6 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
CommonCreatedSystemMessage,
CommonEditedSystemMessage,
CommonFeedItemCreatedSystemMessage,
CommonFeedType,
CommonMemberAddedSystemMessage,
SystemMessageCommonType,
User,
Expand Down Expand Up @@ -73,8 +72,8 @@ const getCommonCreatedSystemMessageText = async (

if (isThisCommonCreated) {
return [
`This ${getCommonTypeText(systemMessageData.commonType)} was created by `,
userEl,
` created this ${getCommonTypeText(systemMessageData.commonType)}`,
];
}

Expand All @@ -91,7 +90,7 @@ const getCommonCreatedSystemMessageText = async (
""
);

return [userEl, " created the space", commonEl].filter(Boolean);
return ["The ", commonEl, " space was created by ", userEl].filter(Boolean);
};

const getCommonEditedSystemMessageText = async (
Expand All @@ -102,14 +101,15 @@ const getCommonEditedSystemMessageText = async (
const userEl = renderUserMention(user, data);

return [
userEl,
` edited this ${getCommonTypeText(systemMessageData.commonType)}’s `,
`This ${getCommonTypeText(systemMessageData.commonType)}’s `,
renderLink(
(data.getCommonPageAboutTabPath || getCommonPageAboutTabPath)(
systemMessageData.commonId,
),
"info",
),
" was edited by ",
userEl,
];
};

Expand Down Expand Up @@ -156,15 +156,7 @@ const getFeedItemCreatedSystemMessageText = async (
""
);

return [
userEl,
` created the ${
systemMessageData.feedItemType === CommonFeedType.Discussion
? "discussion"
: "proposal"
}`,
titleEl,
].filter(Boolean);
return [titleEl, " was created by ", userEl].filter(Boolean);
};

export const getTextFromSystemMessage = async (
Expand Down

0 comments on commit 0fd3b3e

Please sign in to comment.