From 59d9807301772a3a1d2da6060da707f5d19af205 Mon Sep 17 00:00:00 2001 From: Jamie Kyle <113370520+jamiebuilds-signal@users.noreply.github.com> Date: Thu, 25 Jul 2024 07:57:20 -0700 Subject: [PATCH] Fix ringer updates --- ts/state/selectors/message.ts | 6 +++--- ts/util/callDisposition.ts | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ts/state/selectors/message.ts b/ts/state/selectors/message.ts index d99c81915995..d2b69cef8f37 100644 --- a/ts/state/selectors/message.ts +++ b/ts/state/selectors/message.ts @@ -1448,10 +1448,10 @@ export function getPropsForCallHistory( const isSelectMode = selectedMessageIds != null; let callCreator: ConversationType | null = null; - if (callHistory.ringerId) { - callCreator = conversationSelector(callHistory.ringerId); - } else if (callHistory.direction === CallDirection.Outgoing) { + if (callHistory.direction === CallDirection.Outgoing) { callCreator = conversationSelector(ourConversationId); + } else if (callHistory.ringerId) { + callCreator = conversationSelector(callHistory.ringerId); } if (callHistory.mode === CallMode.Direct) { diff --git a/ts/util/callDisposition.ts b/ts/util/callDisposition.ts index 4c48f66a44bd..6dcefadd260c 100644 --- a/ts/util/callDisposition.ts +++ b/ts/util/callDisposition.ts @@ -567,7 +567,9 @@ export function transitionCallHistory( strictAssert(callHistory.callId === callId, 'callId must be same'); strictAssert(callHistory.peerId === peerId, 'peerId must be same'); strictAssert( - ringerId == null || callHistory.ringerId === ringerId, + ringerId == null || + callHistory.ringerId == null || + callHistory.ringerId === ringerId, 'ringerId must be same if it exists' ); strictAssert(callHistory.direction === direction, 'direction must be same');