diff --git a/app/containers/message/utils.ts b/app/containers/message/utils.ts index d82fe25f1..27d904a5d 100644 --- a/app/containers/message/utils.ts +++ b/app/containers/message/utils.ts @@ -26,7 +26,9 @@ export const SYSTEM_MESSAGES = [ 'au', 'ru', 'ul', + 'ult', 'uj', + 'ujt', 'ut', 'rm', 'user-muted', @@ -50,8 +52,10 @@ export const SYSTEM_MESSAGE_TYPES = { MESSAGE_PINNED: 'message_pinned', MESSAGE_SNIPPETED: 'message_snippeted', USER_JOINED_CHANNEL: 'uj', + USER_JOINED_TEAM: 'ujt', USER_JOINED_DISCUSSION: 'ut', - USER_LEFT_CHANNEL: 'ul' + USER_LEFT_CHANNEL: 'ul', + USER_LEFT_TEAM: 'ult' }; export const SYSTEM_MESSAGE_TYPES_WITH_AUTHOR_NAME = [ @@ -59,8 +63,10 @@ export const SYSTEM_MESSAGE_TYPES_WITH_AUTHOR_NAME = [ SYSTEM_MESSAGE_TYPES.MESSAGE_PINNED, SYSTEM_MESSAGE_TYPES.MESSAGE_SNIPPETED, SYSTEM_MESSAGE_TYPES.USER_JOINED_CHANNEL, + SYSTEM_MESSAGE_TYPES.USER_JOINED_TEAM, SYSTEM_MESSAGE_TYPES.USER_JOINED_DISCUSSION, - SYSTEM_MESSAGE_TYPES.USER_LEFT_CHANNEL + SYSTEM_MESSAGE_TYPES.USER_LEFT_CHANNEL, + SYSTEM_MESSAGE_TYPES.USER_LEFT_TEAM ]; type TInfoMessage = { @@ -77,6 +83,9 @@ export const getInfoMessage = ({ type, role, msg, author }: TInfoMessage) => { if (type === 'uj') { return I18n.t('Has_joined_the_channel'); } + if (type === 'ujt') { + return I18n.t('Has_joined_the_team'); + } if (type === 'ut') { return I18n.t('Has_joined_the_conversation'); } @@ -92,6 +101,9 @@ export const getInfoMessage = ({ type, role, msg, author }: TInfoMessage) => { if (type === 'ul') { return I18n.t('Has_left_the_channel'); } + if (type === 'ult') { + return I18n.t('Has_left_the_team'); + } if (type === 'ru') { return I18n.t('User_removed_by', { userRemoved: msg, userBy: username }); } diff --git a/app/i18n/locales/en.json b/app/i18n/locales/en.json index f7e5a5493..499a50e7a 100644 --- a/app/i18n/locales/en.json +++ b/app/i18n/locales/en.json @@ -249,8 +249,10 @@ "Full_table": "Click to see full table", "Generate_New_Link": "Generate New Link", "Has_joined_the_channel": "has joined the channel", + "Has_joined_the_team": "has joined the team", "Has_joined_the_conversation": "has joined the conversation", "Has_left_the_channel": "has left the channel", + "Has_left_the_team": "has left the team", "Hide_System_Messages": "Hide System Messages", "Hide_type_messages": "Hide \"{{type}}\" messages", "How_It_Works": "How It Works", diff --git a/app/utils/messageTypes.ts b/app/utils/messageTypes.ts index d1f6fbf69..4eefa614f 100644 --- a/app/utils/messageTypes.ts +++ b/app/utils/messageTypes.ts @@ -3,10 +3,18 @@ export const MessageTypeValues = [ value: 'uj', text: 'Message_HideType_uj' }, + { + value: 'ujt', + text: 'Message_HideType_ujt' + }, { value: 'ul', text: 'Message_HideType_ul' }, + { + value: 'ult', + text: 'Message_HideType_ult' + }, { value: 'ru', text: 'Message_HideType_ru'