Init local state for remote megaphones

This commit is contained in:
ayumi-signal
2025-12-08 12:03:55 -08:00
committed by GitHub
parent 62b7950b7e
commit 0ab15a1cd8
25 changed files with 955 additions and 62 deletions

View File

@@ -52,6 +52,7 @@ import {
deleteAllBadges,
deleteAllDownloads,
deleteAllDraftAttachments,
deleteAllMegaphones,
deleteAllStickers,
deleteStaleDownloads,
getAllAttachments,
@@ -298,6 +299,11 @@ async function cleanupOrphanedAttachments({
pathsToKeep: await sql.sqlRead('getAllBadgeImageFileLocalPaths'),
});
await deleteAllMegaphones({
userDataPath,
pathsToKeep: await sql.sqlRead('getAllMegaphoneImageLocalPaths'),
});
const allStickers = await getAllStickers(userDataPath);
const orphanedStickers = await sql.sqlWrite(
'removeKnownStickers',