Parcourir la source

feat(call-integration): revert changes related to visitors (#14150)

* feat(mobile/call-integration): removed undefined checks
factor2
Calinteodor il y a 1 an
Parent
révision
6e35e5b310
Aucun compte lié à l'adresse e-mail de l'auteur
1 fichiers modifiés avec 10 ajouts et 7 suppressions
  1. 10
    7
      react/features/mobile/call-integration/middleware.ts

+ 10
- 7
react/features/mobile/call-integration/middleware.ts Voir le fichier

154
     // prevented the user from joining a specific conference but the app may be
154
     // prevented the user from joining a specific conference but the app may be
155
     // able to eventually join the conference.
155
     // able to eventually join the conference.
156
     if (!action.error.recoverable) {
156
     if (!action.error.recoverable) {
157
+        const { callUUID } = action.conference;
157
 
158
 
158
-        if (action?.conference?.callUUID) {
159
+        if (callUUID) {
159
             delete action.conference.callUUID;
160
             delete action.conference.callUUID;
160
-            CallIntegration.reportCallFailed(action.conference.callUUIDID);
161
+            CallIntegration.reportCallFailed(callUUID);
161
         }
162
         }
162
     }
163
     }
163
 
164
 
184
         return result;
185
         return result;
185
     }
186
     }
186
 
187
 
187
-    if (action?.conference?.callUUID) {
188
-        const { callUUID } = action.conference;
188
+    const { callUUID } = action.conference;
189
 
189
 
190
+    if (callUUID) {
190
         CallIntegration.reportConnectedOutgoingCall(callUUID)
191
         CallIntegration.reportConnectedOutgoingCall(callUUID)
191
             .then(() => {
192
             .then(() => {
192
                 // iOS 13 doesn't like the mute state to be false before the call is started
193
                 // iOS 13 doesn't like the mute state to be false before the call is started
229
         return result;
230
         return result;
230
     }
231
     }
231
 
232
 
232
-    if (action?.conference?.callUUID) {
233
+    const { callUUID } = action.conference;
234
+
235
+    if (callUUID) {
233
         delete action.conference.callUUID;
236
         delete action.conference.callUUID;
234
-        CallIntegration.endCall(action.conference.callUUID);
237
+        CallIntegration.endCall(callUUID);
235
     }
238
     }
236
 
239
 
237
     return result;
240
     return result;
270
     }
273
     }
271
 
274
 
272
     // When assigning the call UUID, do so in upper case, since iOS will return
275
     // When assigning the call UUID, do so in upper case, since iOS will return
273
-    // it upper cased.
276
+    // it upper-cased.
274
     conference.callUUID = (callUUID || uuidv4()).toUpperCase();
277
     conference.callUUID = (callUUID || uuidv4()).toUpperCase();
275
 
278
 
276
     CallIntegration.startCall(conference.callUUID, handle, hasVideo)
279
     CallIntegration.startCall(conference.callUUID, handle, hasVideo)

Chargement…
Annuler
Enregistrer