fix: fix removing emoji from display names (#1114)

This commit is contained in:
Nolan Lawson 2019-03-22 15:55:33 -07:00 committed by GitHub
parent 47255e818c
commit cf104163fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -88,12 +88,12 @@
id: ({ verifyCredentials }) => (verifyCredentials && verifyCredentials.id), id: ({ verifyCredentials }) => (verifyCredentials && verifyCredentials.id),
href: ({ id }) => (id ? `/accounts/${id}` : '#'), href: ({ id }) => (id ? `/accounts/${id}` : '#'),
emojis: ({ verifyCredentials }) => (verifyCredentials.emojis || []), emojis: ({ verifyCredentials }) => (verifyCredentials.emojis || []),
displayName: ({ verifyCredentials }) => verifyCredentials.display_name || verifyCredentials.username, displayName: ({ verifyCredentials }) => verifyCredentials.display_name || verifyCredentials.username || '',
accessibleName: ({ displayName, emojis, $omitEmojiInDisplayNames }) => { accessibleName: ({ displayName, emojis, $omitEmojiInDisplayNames }) => {
if ($omitEmojiInDisplayNames) { if ($omitEmojiInDisplayNames) {
return removeEmoji(displayName, emojis) || displayName || '' return removeEmoji(displayName, emojis) || displayName
} }
return displayName || '' return displayName
} }
} }
} }