mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Save storage for defunct and pending call links
This commit is contained in:
@@ -83,13 +83,41 @@ export type CallLinkConversationType = ReadonlyDeep<
|
||||
}
|
||||
>;
|
||||
|
||||
// Call link discovered from sync, waiting to refresh state from the calling server
|
||||
export type PendingCallLinkType = Readonly<{
|
||||
rootKey: string;
|
||||
adminKey: string | null;
|
||||
}> &
|
||||
StorageServiceFieldsType;
|
||||
|
||||
// Call links discovered missing after server refresh
|
||||
export type DefunctCallLinkType = Readonly<{
|
||||
roomId: string;
|
||||
rootKey: string;
|
||||
adminKey: string | null;
|
||||
}> &
|
||||
StorageServiceFieldsType;
|
||||
|
||||
export type DefunctCallLinkRecord = Readonly<{
|
||||
roomId: string;
|
||||
rootKey: Uint8Array;
|
||||
adminKey: Uint8Array | null;
|
||||
storageID: string | null;
|
||||
storageVersion: number | null;
|
||||
storageUnknownFields: Uint8Array | null;
|
||||
storageNeedsSync: 1 | 0;
|
||||
}>;
|
||||
|
||||
export const defunctCallLinkRecordSchema = z.object({
|
||||
roomId: z.string(),
|
||||
rootKey: z.instanceof(Uint8Array),
|
||||
adminKey: z.instanceof(Uint8Array).nullable(),
|
||||
storageID: z.string().nullable(),
|
||||
storageVersion: z.number().int().nullable(),
|
||||
storageUnknownFields: z.instanceof(Uint8Array).nullable(),
|
||||
storageNeedsSync: z.union([z.literal(1), z.literal(0)]),
|
||||
}) satisfies z.ZodType<DefunctCallLinkRecord>;
|
||||
|
||||
// DB Record
|
||||
export type CallLinkRecord = Readonly<{
|
||||
roomId: string;
|
||||
|
||||
Reference in New Issue
Block a user