Resolve sticker pack references after import

Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
automated-signal
2025-01-28 16:33:43 -06:00
committed by GitHub
parent 5831a23821
commit ffbd8d5ea7
7 changed files with 216 additions and 40 deletions

View File

@@ -303,11 +303,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) {