Animated Emoji: Follow-up fix for missing animations (#1097)

This commit is contained in:
Alexander Zinchuk 2021-05-13 13:46:22 +03:00
parent 2ea277d7a8
commit f59abd16c7

View File

@ -39,5 +39,8 @@ export function selectAnimatedEmoji(global: GlobalState, emoji: string) {
return undefined; return undefined;
} }
return animatedEmojis.stickers.find((sticker) => sticker.emoji === emoji); // Some emojis (❤️ for example) with a service symbol 'VARIATION SELECTOR-16' are not recognized as animated
const cleanedEmoji = emoji.replace('\ufe0f', '');
return animatedEmojis.stickers.find((sticker) => sticker.emoji === emoji || sticker.emoji === cleanedEmoji);
} }