Skip to content

Commit

Permalink
fix(rn): remove myself in conversation names
Browse files Browse the repository at this point in the history
Signed-off-by: Godefroy Ponsinet <godefroy.ponsinet@outlook.com>
  • Loading branch information
90dy committed Dec 21, 2018
1 parent 5e6f6fd commit 5a875e0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions client/react-native/common/utils/conversation.js
Expand Up @@ -8,13 +8,11 @@ export const getTitle = ({ title, members } = this.props) =>
(title && title !== '' && title) ||
(members &&
members
.filter(m => m.contact && m.contact.status !== 42)
.map((m, index) => {
const displayName =
m.contact && m.contact.status === 42
? 'Myself'
: (m.contact &&
(m.contact.overrideDisplayName || m.contact.displayName)) ||
'?????'
m.contact &&
(m.contact.overrideDisplayName || m.contact.displayName || '?????')
const before =
index === 0 ? '' : index === members.length - 1 ? ' and ' : ', '
return `${before}${displayName}`
Expand Down

0 comments on commit 5a875e0

Please sign in to comment.