A few fixes for the emoji bundled with stickers

This commit is contained in:
Scott Nonnenberg 2022-08-08 11:21:00 -07:00 committed by GitHub
parent 7a1686b915
commit fde917c983
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 30 additions and 8 deletions

View file

@ -449,6 +449,12 @@ export async function downloadEphemeralPack(
proto.stickers,
sticker => !isNumber(sticker.id) || sticker.id === coverStickerId
);
const coverSticker = proto.stickers.filter(
sticker => isNumber(sticker.id) && sticker.id === coverStickerId
);
if (coverSticker[0] && !coverProto.emoji) {
coverProto.emoji = coverSticker[0].emoji;
}
const coverIncludedInList = nonCoverStickers.length < stickerCount;
@ -652,6 +658,12 @@ async function doDownloadStickerPack(
proto.stickers,
sticker => !isNumber(sticker.id) || sticker.id === coverStickerId
);
const coverSticker = proto.stickers.filter(
sticker => isNumber(sticker.id) && sticker.id === coverStickerId
);
if (coverSticker[0] && !coverProto.emoji) {
coverProto.emoji = coverSticker[0].emoji;
}
coverIncludedInList = nonCoverStickers.length < stickerCount;