Init local state for remote megaphones

Co-authored-by: ayumi-signal <143036029+ayumi-signal@users.noreply.github.com>
This commit is contained in:
automated-signal
2025-12-09 09:42:48 -06:00
committed by GitHub
parent 5e94218b5a
commit 48defe4334
25 changed files with 955 additions and 62 deletions

View File

@@ -264,6 +264,15 @@ import {
deletePinnedMessageByMessageId,
deleteAllExpiredPinnedMessagesBefore,
} from './server/pinnedMessages.std.js';
import {
getAllMegaphones,
createMegaphone,
updateMegaphone,
deleteMegaphone,
internalDeleteAllMegaphones,
getAllMegaphoneImageLocalPaths,
hasMegaphone,
} from './server/megaphones.std.js';
import { INITIAL_EXPIRE_TIMER_VERSION } from '../util/expirationTimer.std.js';
import type { GifType } from '../components/fun/panels/FunPanelGifs.dom.js';
import type { NotificationProfileType } from '../types/NotificationProfile.std.js';
@@ -478,6 +487,9 @@ export const DataReader: ServerReadableInterface = {
hasAllChatsChatFolder,
getOldestDeletedChatFolder,
getAllMegaphones,
hasMegaphone,
getPinnedMessagesForConversation,
getNextExpiringPinnedMessageAcrossConversations,
@@ -509,6 +521,7 @@ export const DataReader: ServerReadableInterface = {
getAllBadges,
getAllBadgeImageFileLocalPaths,
getAllMegaphoneImageLocalPaths,
getAllStoryDistributionsWithMembers,
getStoryDistributionWithMembers,
_getAllStoryDistributions,
@@ -735,6 +748,11 @@ export const DataWriter: ServerWritableInterface = {
markChatFolderDeleted,
deleteExpiredChatFolders,
createMegaphone,
updateMegaphone,
deleteMegaphone,
internalDeleteAllMegaphones,
appendPinnedMessage,
deletePinnedMessageByMessageId,
deleteAllExpiredPinnedMessagesBefore,
@@ -8185,6 +8203,7 @@ function removeAll(db: WritableDB): void {
DELETE FROM items;
DELETE FROM jobs;
DELETE FROM kyberPreKeys;
DELETE FROM megaphones;
DELETE FROM message_attachments;
DELETE FROM messages_fts;
DELETE FROM messages;