Fix animated emoji such as "🤷‍♂️"

This commit is contained in:
Eduard Kuzmenko 2020-11-28 18:47:45 +02:00
parent 9b811795f5
commit d1d5c3074b

View File

@ -94,7 +94,8 @@ export class AppStickersManager {
if(!stickerSet || !stickerSet.documents) return undefined;
emoji = emoji.replace(/\ufe0f/g, '').replace(/🏻|🏼|🏽|🏾|🏿/g, '');
return stickerSet.documents.find(doc => (doc as Document.document).stickerEmojiRaw == emoji);
const pack = stickerSet.packs.find(p => p.emoticon == emoji);
return pack ? appDocsManager.getDoc(pack.documents[0]) : undefined;
}
public saveStickerSet(res: Omit<MessagesStickerSet.messagesStickerSet, '_'>, id: string) {