mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-25 04:36:46 +00:00
Fix handling CallLogEvent sync for call link targets
This commit is contained in:
@@ -282,10 +282,14 @@ const callLogEventFromProto: Partial<
|
||||
export function getCallLogEventForProto(
|
||||
callLogEventProto: Proto.SyncMessage.ICallLogEvent
|
||||
): CallLogEventDetails {
|
||||
const callLogEvent = parsePartial(
|
||||
callLogEventNormalizeSchema,
|
||||
callLogEventProto
|
||||
);
|
||||
// CallLogEvent peerId is ambiguous whether it's a conversationId (direct, or groupId)
|
||||
// or roomId so handle both cases
|
||||
const { peerId: peerIdBytes } = callLogEventProto;
|
||||
const callLogEvent = parsePartial(callLogEventNormalizeSchema, {
|
||||
...callLogEventProto,
|
||||
peerIdAsConversationId: peerIdBytes,
|
||||
peerIdAsRoomId: peerIdBytes,
|
||||
});
|
||||
|
||||
const type = callLogEventFromProto[callLogEvent.type];
|
||||
if (type == null) {
|
||||
@@ -295,7 +299,8 @@ export function getCallLogEventForProto(
|
||||
return {
|
||||
type,
|
||||
timestamp: callLogEvent.timestamp,
|
||||
peerId: callLogEvent.peerId ?? null,
|
||||
peerIdAsConversationId: callLogEvent.peerIdAsConversationId ?? null,
|
||||
peerIdAsRoomId: callLogEvent.peerIdAsRoomId ?? null,
|
||||
callId: callLogEvent.callId ?? null,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user