mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-18 23:49:20 +01:00
Sync call link call history
This commit is contained in:
@@ -3,22 +3,32 @@
|
||||
|
||||
import type { CallEventSyncEvent } from '../textsecure/messageReceiverEvents';
|
||||
import * as log from '../logging/log';
|
||||
import { updateCallHistoryFromRemoteEvent } from './callDisposition';
|
||||
import {
|
||||
peerIdToLog,
|
||||
updateCallHistoryFromRemoteEvent,
|
||||
} from './callDisposition';
|
||||
import { CallMode } from '../types/Calling';
|
||||
|
||||
export async function onCallEventSync(
|
||||
syncEvent: CallEventSyncEvent
|
||||
): Promise<void> {
|
||||
const { callEvent, confirm } = syncEvent;
|
||||
const { callEventDetails, receivedAtCounter } = callEvent;
|
||||
const { peerId } = callEventDetails;
|
||||
|
||||
const conversation = window.ConversationController.get(peerId);
|
||||
if (
|
||||
callEventDetails.mode === CallMode.Direct ||
|
||||
callEventDetails.mode === CallMode.Group
|
||||
) {
|
||||
const { peerId } = callEventDetails;
|
||||
const conversation = window.ConversationController.get(peerId);
|
||||
|
||||
if (!conversation) {
|
||||
log.warn(
|
||||
`onCallEventSync: No conversation found for conversationId ${peerId}`
|
||||
);
|
||||
return;
|
||||
if (!conversation) {
|
||||
const peerIdLog = peerIdToLog(peerId, callEventDetails.mode);
|
||||
log.warn(
|
||||
`onCallEventSync: No conversation found for conversationId ${peerIdLog}`
|
||||
);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
await updateCallHistoryFromRemoteEvent(callEventDetails, receivedAtCounter);
|
||||
|
||||
Reference in New Issue
Block a user