From 8f9255aa12669a5bccff2d4472c2978779212474 Mon Sep 17 00:00:00 2001 From: Devin Binnie <52460000+devinbinnie@users.noreply.github.com> Date: Tue, 10 Sep 2019 13:04:54 -0400 Subject: [PATCH] [MM-18174] Replicated missing user functionality for system messages from webapp in RN (#3219) --- .../combined_system_message/combined_system_message.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/components/combined_system_message/combined_system_message.js b/app/components/combined_system_message/combined_system_message.js index 72d6e82b0..fd66ff9b7 100644 --- a/app/components/combined_system_message/combined_system_message.js +++ b/app/components/combined_system_message/combined_system_message.js @@ -241,12 +241,16 @@ export default class CombinedSystemMessage extends React.PureComponent { getUsernamesByIds = (userIds = []) => { const {currentUserId, currentUsername} = this.props; const allUsernames = this.getAllUsernames(); + + const {formatMessage} = this.context.intl; + const someone = formatMessage({id: t('channel_loader.someone'), defaultMessage: 'Someone'}); + const usernames = userIds. filter((userId) => { return userId !== currentUserId && userId !== currentUsername; }). map((userId) => { - return `@${allUsernames[userId]}`; + return allUsernames[userId] ? `@${allUsernames[userId]}` : someone; }).filter((username) => { return username && username !== ''; });