Calls Tab & Group Call Disposition

This commit is contained in:
Jamie Kyle 2023-08-08 17:53:06 -07:00 committed by GitHub
parent 620e85ca01
commit 1eaabb6734
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
139 changed files with 9182 additions and 2721 deletions

View file

@ -0,0 +1,26 @@
// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import type { CallLogEventSyncEvent } from '../textsecure/messageReceiverEvents';
import * as log from '../logging/log';
import { CallLogEvent } from '../types/CallDisposition';
import { missingCaseError } from './missingCaseError';
export async function onCallLogEventSync(
syncEvent: CallLogEventSyncEvent
): Promise<void> {
const { callLogEvent, confirm } = syncEvent;
const { event, timestamp } = callLogEvent;
log.info(
`onCallLogEventSync: Processing event (Event: ${event}, Timestamp: ${timestamp})`
);
if (event === CallLogEvent.Clear) {
log.info(`onCallLogEventSync: Clearing call history before ${timestamp}`);
await window.Signal.Data.clearCallHistory(timestamp);
confirm();
} else {
throw missingCaseError(event);
}
}