Better sync between convo and protocol stores
This commit is contained in:
parent
442cc43b94
commit
fbf91a4d79
10 changed files with 195 additions and 14 deletions
6
ts/CI.ts
6
ts/CI.ts
|
@ -34,6 +34,7 @@ export type CIType = {
|
|||
) => unknown;
|
||||
openSignalRoute(url: string): Promise<void>;
|
||||
exportBackupToDisk(path: string): Promise<void>;
|
||||
unlink: () => void;
|
||||
};
|
||||
|
||||
export type GetCIOptionsType = Readonly<{
|
||||
|
@ -162,6 +163,10 @@ export function getCI({ deviceName, backupData }: GetCIOptionsType): CIType {
|
|||
await backupsService.exportToDisk(path);
|
||||
}
|
||||
|
||||
function unlink() {
|
||||
window.Whisper.events.trigger('unlinkAndDisconnect');
|
||||
}
|
||||
|
||||
return {
|
||||
deviceName,
|
||||
backupData,
|
||||
|
@ -173,5 +178,6 @@ export function getCI({ deviceName, backupData }: GetCIOptionsType): CIType {
|
|||
waitForEvent,
|
||||
openSignalRoute,
|
||||
exportBackupToDisk,
|
||||
unlink,
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue