Import/export sticker packs

Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
automated-signal 2024-06-12 17:57:27 -05:00 committed by GitHub
parent d426109734
commit a0fb131294
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 62 additions and 15 deletions

View file

@ -552,6 +552,7 @@ export type DownloadStickerPackOptions = Readonly<{
messageId?: string;
fromSync?: boolean;
fromStorageService?: boolean;
fromBackup?: boolean;
finalStatus?: StickerPackStatusType;
suppressError?: boolean;
}>;
@ -582,6 +583,7 @@ async function doDownloadStickerPack(
messageId,
fromSync = false,
fromStorageService = false,
fromBackup = false,
suppressError = false,
}: DownloadStickerPackOptions
): Promise<void> {
@ -703,7 +705,7 @@ async function doDownloadStickerPack(
status: 'pending',
createdAt: Date.now(),
stickers: {},
storageNeedsSync: !fromStorageService,
storageNeedsSync: !fromStorageService && !fromBackup,
title: proto.title ?? '',
author: proto.author ?? '',
};
@ -788,6 +790,7 @@ async function doDownloadStickerPack(
await installStickerPack(packId, packKey, {
fromSync,
fromStorageService,
fromBackup,
});
} else {
// Mark the pack as complete