fix: Fix leaving call if a signaling message is received while reconnecting

When the local participant is in the call and a signaling message does
not list the participant as being in the call the call is left (as it is
assumed that, for example, the participant was kicked out from the call
by a moderator). During a forced reconnection the local participant was
not marked as "not in the call" when the call was left, so in the time
between sending the request to join the call again and receiving a
signaling message confirming that the call was joined another signaling
message that does not list the participant yet as in the call caused the
UI to leave the call (for example, if another participant also joined).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2023-11-08 05:56:55 +01:00 committed by backportbot[bot]
commit 527f24a2bb

View file

@ -619,6 +619,11 @@ export default function initWebRtc(signaling, _callParticipantCollection, _local
// cases the call should be kept active from the point of view of
// WebRTC.
if (reconnect) {
// The signaling state must be marked as not in the call to prevent
// that after joining the call again the local participant is
// treated as in the call before a signaling message confirms it.
selfInCall = PARTICIPANT.CALL_FLAG.DISCONNECTED
return
}