From 05aacc2c98ffd700beb17e784a047cd68671bf91 Mon Sep 17 00:00:00 2001 From: automated-signal <37887102+automated-signal@users.noreply.github.com> Date: Thu, 25 Jul 2024 10:09:31 -0500 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 d99c819159..d2b69cef8f 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 1595a11f81..1a9fdcba65 100644 --- a/ts/util/callDisposition.ts +++ b/ts/util/callDisposition.ts @@ -566,7 +566,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');