Import/export sticker packs
This commit is contained in:
parent
111bb70188
commit
511a7f1646
5 changed files with 62 additions and 15 deletions
|
@ -212,6 +212,7 @@ export class BackupExportStream extends Readable {
|
|||
distributionLists: 0,
|
||||
messages: 0,
|
||||
skippedMessages: 0,
|
||||
stickerPacks: 0,
|
||||
};
|
||||
|
||||
for (const { attributes } of window.ConversationController.getAll()) {
|
||||
|
@ -284,6 +285,21 @@ export class BackupExportStream extends Readable {
|
|||
stats.distributionLists += 1;
|
||||
}
|
||||
|
||||
const stickerPacks = await Data.getInstalledStickerPacks();
|
||||
|
||||
for (const { id, key } of stickerPacks) {
|
||||
this.pushFrame({
|
||||
stickerPack: {
|
||||
packId: Bytes.fromHex(id),
|
||||
packKey: Bytes.fromBase64(key),
|
||||
},
|
||||
});
|
||||
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await this.flush();
|
||||
stats.stickerPacks += 1;
|
||||
}
|
||||
|
||||
const pinnedConversationIds =
|
||||
window.storage.get('pinnedConversationIds') || [];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue