[FIX] Joining and leaving messages in teams (#3591)
Co-authored-by: Gleidson Daniel Silva <gleidson10daniel@hotmail.com> Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
parent
9d9553b075
commit
11af3503b8
|
@ -26,7 +26,9 @@ export const SYSTEM_MESSAGES = [
|
||||||
'au',
|
'au',
|
||||||
'ru',
|
'ru',
|
||||||
'ul',
|
'ul',
|
||||||
|
'ult',
|
||||||
'uj',
|
'uj',
|
||||||
|
'ujt',
|
||||||
'ut',
|
'ut',
|
||||||
'rm',
|
'rm',
|
||||||
'user-muted',
|
'user-muted',
|
||||||
|
@ -50,8 +52,10 @@ export const SYSTEM_MESSAGE_TYPES = {
|
||||||
MESSAGE_PINNED: 'message_pinned',
|
MESSAGE_PINNED: 'message_pinned',
|
||||||
MESSAGE_SNIPPETED: 'message_snippeted',
|
MESSAGE_SNIPPETED: 'message_snippeted',
|
||||||
USER_JOINED_CHANNEL: 'uj',
|
USER_JOINED_CHANNEL: 'uj',
|
||||||
|
USER_JOINED_TEAM: 'ujt',
|
||||||
USER_JOINED_DISCUSSION: 'ut',
|
USER_JOINED_DISCUSSION: 'ut',
|
||||||
USER_LEFT_CHANNEL: 'ul'
|
USER_LEFT_CHANNEL: 'ul',
|
||||||
|
USER_LEFT_TEAM: 'ult'
|
||||||
};
|
};
|
||||||
|
|
||||||
export const SYSTEM_MESSAGE_TYPES_WITH_AUTHOR_NAME = [
|
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_PINNED,
|
||||||
SYSTEM_MESSAGE_TYPES.MESSAGE_SNIPPETED,
|
SYSTEM_MESSAGE_TYPES.MESSAGE_SNIPPETED,
|
||||||
SYSTEM_MESSAGE_TYPES.USER_JOINED_CHANNEL,
|
SYSTEM_MESSAGE_TYPES.USER_JOINED_CHANNEL,
|
||||||
|
SYSTEM_MESSAGE_TYPES.USER_JOINED_TEAM,
|
||||||
SYSTEM_MESSAGE_TYPES.USER_JOINED_DISCUSSION,
|
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 = {
|
type TInfoMessage = {
|
||||||
|
@ -77,6 +83,9 @@ export const getInfoMessage = ({ type, role, msg, author }: TInfoMessage) => {
|
||||||
if (type === 'uj') {
|
if (type === 'uj') {
|
||||||
return I18n.t('Has_joined_the_channel');
|
return I18n.t('Has_joined_the_channel');
|
||||||
}
|
}
|
||||||
|
if (type === 'ujt') {
|
||||||
|
return I18n.t('Has_joined_the_team');
|
||||||
|
}
|
||||||
if (type === 'ut') {
|
if (type === 'ut') {
|
||||||
return I18n.t('Has_joined_the_conversation');
|
return I18n.t('Has_joined_the_conversation');
|
||||||
}
|
}
|
||||||
|
@ -92,6 +101,9 @@ export const getInfoMessage = ({ type, role, msg, author }: TInfoMessage) => {
|
||||||
if (type === 'ul') {
|
if (type === 'ul') {
|
||||||
return I18n.t('Has_left_the_channel');
|
return I18n.t('Has_left_the_channel');
|
||||||
}
|
}
|
||||||
|
if (type === 'ult') {
|
||||||
|
return I18n.t('Has_left_the_team');
|
||||||
|
}
|
||||||
if (type === 'ru') {
|
if (type === 'ru') {
|
||||||
return I18n.t('User_removed_by', { userRemoved: msg, userBy: username });
|
return I18n.t('User_removed_by', { userRemoved: msg, userBy: username });
|
||||||
}
|
}
|
||||||
|
|
|
@ -249,8 +249,10 @@
|
||||||
"Full_table": "Click to see full table",
|
"Full_table": "Click to see full table",
|
||||||
"Generate_New_Link": "Generate New Link",
|
"Generate_New_Link": "Generate New Link",
|
||||||
"Has_joined_the_channel": "has joined the channel",
|
"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_joined_the_conversation": "has joined the conversation",
|
||||||
"Has_left_the_channel": "has left the channel",
|
"Has_left_the_channel": "has left the channel",
|
||||||
|
"Has_left_the_team": "has left the team",
|
||||||
"Hide_System_Messages": "Hide System Messages",
|
"Hide_System_Messages": "Hide System Messages",
|
||||||
"Hide_type_messages": "Hide \"{{type}}\" messages",
|
"Hide_type_messages": "Hide \"{{type}}\" messages",
|
||||||
"How_It_Works": "How It Works",
|
"How_It_Works": "How It Works",
|
||||||
|
|
|
@ -3,10 +3,18 @@ export const MessageTypeValues = [
|
||||||
value: 'uj',
|
value: 'uj',
|
||||||
text: 'Message_HideType_uj'
|
text: 'Message_HideType_uj'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
value: 'ujt',
|
||||||
|
text: 'Message_HideType_ujt'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
value: 'ul',
|
value: 'ul',
|
||||||
text: 'Message_HideType_ul'
|
text: 'Message_HideType_ul'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
value: 'ult',
|
||||||
|
text: 'Message_HideType_ult'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
value: 'ru',
|
value: 'ru',
|
||||||
text: 'Message_HideType_ru'
|
text: 'Message_HideType_ru'
|
||||||
|
|
Loading…
Reference in New Issue