Resolve sticker pack references after import

This commit is contained in:
Fedor Indutny
2025-01-28 13:57:19 -08:00
committed by GitHub
parent fbdf589f13
commit 9fab74e867
7 changed files with 216 additions and 40 deletions

View File

@@ -314,11 +314,17 @@ export async function queueAttachmentDownloads(
log.error(`${idLog}: Sticker data was missing`);
}
}
const stickerRef = {
messageId,
packId,
stickerId,
isUnresolved: sticker.data?.error === true,
};
if (!status) {
// Save the packId/packKey for future download/install
void savePackMetadata(packId, packKey, { messageId });
void savePackMetadata(packId, packKey, stickerRef);
} else {
await DataWriter.addStickerPackReference(messageId, packId);
await DataWriter.addStickerPackReference(stickerRef);
}
if (!data) {