Replicated missing user functionality for system messages from webapp in RN (#3236)
This commit is contained in:
parent
8004a906cf
commit
be5ff217da
1 changed files with 5 additions and 1 deletions
|
|
@ -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 !== '';
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue