do not fetch unicode emojis

This commit is contained in:
Elias Nahum 2022-06-07 15:26:24 -04:00
parent 3082089821
commit c6764a89a4
No known key found for this signature in database
GPG key ID: E038DB71E0B61702

View file

@ -54,7 +54,6 @@ const Emoji = (props: Props) => {
let unicode;
let imageUrl = '';
const name = emojiName.trim();
if (EmojiIndicesByAlias.has(name)) {
const emoji = Emojis[EmojiIndicesByAlias.get(name)!];
if (emoji.category === 'custom') {
@ -62,7 +61,7 @@ const Emoji = (props: Props) => {
} else {
unicode = emoji.image;
}
} else if (!isUnicodeEmoji(name)) {
} else {
const custom = customEmojis.find((ce) => ce.name === name);
if (custom) {
try {
@ -71,7 +70,7 @@ const Emoji = (props: Props) => {
} catch {
// do nothing
}
} else if (name) {
} else if (name && !isUnicodeEmoji(name)) {
fetchCustomEmojiInBatch(serverUrl, name);
}
}