Support delete for call links

Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
Jamie Kyle 2024-08-06 12:29:13 -07:00 committed by GitHub
parent 11fed7e7f8
commit 9a9f9495f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
67 changed files with 853 additions and 345 deletions

View file

@ -5,9 +5,11 @@ import { CallLinkRootKey } from '@signalapp/ringrtc';
import type { CallLinkUpdateSyncEvent } from '../textsecure/messageReceiverEvents';
import * as log from '../logging/log';
import * as Errors from '../types/errors';
import { fromAdminKeyBytes, getRoomIdFromRootKey } from './callLinks';
import { fromAdminKeyBytes } from './callLinks';
import { getRoomIdFromRootKey } from './callLinksRingrtc';
import { strictAssert } from './assert';
import { CallLinkUpdateSyncType } from '../types/CallLink';
import { DataWriter } from '../sql/Client';
export async function onCallLinkUpdateSync(
syncEvent: CallLinkUpdateSyncEvent
@ -46,8 +48,9 @@ export async function onCallLinkUpdateSync(
adminKey: adminKeyString,
});
} else if (type === CallLinkUpdateSyncType.Delete) {
// TODO: DESKTOP-6951
log.warn(`${logId}: Deleting call links is not supported`);
log.info(`${logId}: Deleting call link record ${roomId}`);
await DataWriter.deleteCallLinkFromSync(roomId);
window.reduxActions.calling.handleCallLinkDelete({ roomId });
}
confirm();