Fix db error from concurrent processing of call link update sync

This commit is contained in:
ayumi-signal 2025-06-30 16:58:26 -07:00 committed by GitHub
commit bcb1a614ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 217 additions and 40 deletions

View file

@ -53,6 +53,7 @@ import type { AttachmentBackupJobType } from '../types/AttachmentBackup';
import type { GifType } from '../components/fun/panels/FunPanelGifs';
import type { NotificationProfileType } from '../types/NotificationProfile';
import type { DonationReceipt } from '../types/Donations';
import type { InsertOrUpdateCallLinkFromSyncResult } from './server/callLinks';
export type ReadableDB = Database & { __readable_db: never };
export type WritableDB = ReadableDB & { __writable_db: never };
@ -1030,8 +1031,10 @@ type WritableInterface = {
markCallHistoryMissed(callIds: ReadonlyArray<string>): void;
getRecentStaleRingsAndMarkOlderMissed(): ReadonlyArray<MaybeStaleCallHistory>;
insertCallLink(callLink: CallLinkType): void;
insertOrUpdateCallLinkFromSync(
callLink: CallLinkType
): InsertOrUpdateCallLinkFromSyncResult;
updateCallLink(callLink: CallLinkType): void;
updateCallLinkAdminKeyByRoomId(roomId: string, adminKey: string): void;
updateCallLinkState(
roomId: string,
callLinkState: CallLinkStateType