Ensure that calls ring at more appropriate times
This commit is contained in:
parent
ec9041937f
commit
1620ccf3ab
2 changed files with 28 additions and 1 deletions
|
@ -2950,6 +2950,19 @@ export class CallingClass {
|
||||||
localCallEvent,
|
localCallEvent,
|
||||||
'CallingClass.handleAutoEndedIncomingCallRequest'
|
'CallingClass.handleAutoEndedIncomingCallRequest'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!this.reduxInterface) {
|
||||||
|
log.error(
|
||||||
|
'handleAutoEndedIncomingCallRequest: Unable to update redux for call'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
this.reduxInterface?.callStateChange({
|
||||||
|
acceptedTime: null,
|
||||||
|
callEndedReason,
|
||||||
|
callState: CallState.Ended,
|
||||||
|
conversationId: conversation.id,
|
||||||
|
});
|
||||||
|
|
||||||
await updateCallHistoryFromLocalEvent(
|
await updateCallHistoryFromLocalEvent(
|
||||||
callEvent,
|
callEvent,
|
||||||
receivedAtCounter ?? null,
|
receivedAtCounter ?? null,
|
||||||
|
|
|
@ -38,6 +38,13 @@ export const getRingingCall = (
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
activeCallState?.state === 'Active' &&
|
||||||
|
activeCallState.conversationId !== call.conversationId
|
||||||
|
) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return isRinging(call.callState) && call.callEndedReason == null;
|
return isRinging(call.callState) && call.callEndedReason == null;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -50,11 +57,18 @@ export const getRingingCall = (
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
activeCallState?.state === 'Active' &&
|
||||||
|
activeCallState.conversationId !== call.conversationId
|
||||||
|
) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Outgoing - ringerAci is not set for outgoing group calls
|
// Outgoing - ringerAci is not set for outgoing group calls
|
||||||
if (
|
if (
|
||||||
activeCallState?.state === 'Active' &&
|
activeCallState?.state === 'Active' &&
|
||||||
activeCallState.outgoingRing &&
|
|
||||||
activeCallState.conversationId === call.conversationId &&
|
activeCallState.conversationId === call.conversationId &&
|
||||||
|
activeCallState.outgoingRing &&
|
||||||
isConnected(call.connectionState) &&
|
isConnected(call.connectionState) &&
|
||||||
isJoined(call.joinState) &&
|
isJoined(call.joinState) &&
|
||||||
!hasRemoteParticipants(call.remoteParticipants)
|
!hasRemoteParticipants(call.remoteParticipants)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue