Resumable backup import

This commit is contained in:
Fedor Indutny 2024-08-27 17:00:41 -04:00 committed by GitHub
parent 3d8aaf0a5a
commit 8ef149e3a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 498 additions and 33 deletions

View file

@ -346,6 +346,7 @@ export const DataReader: ServerReadableInterface = {
finishGetKnownMessageAttachments,
pageMessages,
finishPageMessages,
getKnownDownloads,
getKnownConversationAttachments,
};
@ -6810,6 +6811,17 @@ function finishPageMessages(
`);
}
function getKnownDownloads(db: ReadableDB): Array<string> {
const result = [];
const backup = getItemById(db, 'backupDownloadPath');
if (backup) {
result.push(backup.value);
}
return result;
}
function getKnownConversationAttachments(db: ReadableDB): Array<string> {
const result = new Set<string>();
const chunkSize = 500;