Merge branch 'voip/remove-call-in-group-calls-correctly' into 'main'

fix: Fix can't correctly remove/cleanup call in group call.

See merge request famedly/company/frontend/famedlysdk!1222
This commit is contained in:
td 2023-01-27 12:23:19 +00:00
commit 10e6b9b0e6
1 changed files with 6 additions and 2 deletions

View File

@ -1071,8 +1071,12 @@ class CallSession {
if (shouldEmit) {
setCallState(CallState.kEnded);
}
if (callId != voip.currentCID) return;
voip.currentCID = null;
if (!isGroupCall) {
if (callId != voip.currentCID) return;
voip.currentCID = null;
}
voip.calls.remove(callId);
voip.incomingCallRoomId.removeWhere((key, value) => value == callId);
await cleanUp();