Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change system message text on new stream & new space #2237 #2272

Merged
merged 1 commit into from
Oct 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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