Skip to content

Commit

Permalink
feat(call-integration): revert changes related to visitors (jitsi#14150)
Browse files Browse the repository at this point in the history
* feat(mobile/call-integration): removed undefined checks
  • Loading branch information
Calinteodor authored Dec 13, 2023
1 parent 429787f commit 6e35e5b
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions react/features/mobile/call-integration/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,11 @@ function _conferenceFailed({ getState }: IStore, next: Function, action: AnyActi
// prevented the user from joining a specific conference but the app may be
// able to eventually join the conference.
if (!action.error.recoverable) {
const { callUUID } = action.conference;

if (action?.conference?.callUUID) {
if (callUUID) {
delete action.conference.callUUID;
CallIntegration.reportCallFailed(action.conference.callUUIDID);
CallIntegration.reportCallFailed(callUUID);
}
}

Expand All @@ -184,9 +185,9 @@ function _conferenceJoined({ getState }: IStore, next: Function, action: AnyActi
return result;
}

if (action?.conference?.callUUID) {
const { callUUID } = action.conference;
const { callUUID } = action.conference;

if (callUUID) {
CallIntegration.reportConnectedOutgoingCall(callUUID)
.then(() => {
// iOS 13 doesn't like the mute state to be false before the call is started
Expand Down Expand Up @@ -229,9 +230,11 @@ function _conferenceLeft({ getState }: IStore, next: Function, action: AnyAction
return result;
}

if (action?.conference?.callUUID) {
const { callUUID } = action.conference;

if (callUUID) {
delete action.conference.callUUID;
CallIntegration.endCall(action.conference.callUUID);
CallIntegration.endCall(callUUID);
}

return result;
Expand Down Expand Up @@ -270,7 +273,7 @@ function _conferenceWillJoin({ dispatch, getState }: IStore, next: Function, act
}

// When assigning the call UUID, do so in upper case, since iOS will return
// it upper cased.
// it upper-cased.
conference.callUUID = (callUUID || uuidv4()).toUpperCase();

CallIntegration.startCall(conference.callUUID, handle, hasVideo)
Expand Down

0 comments on commit 6e35e5b

Please sign in to comment.