Преглед на файлове

[RN] No CallKit failure on recoverable errors

j8
Lyubo Marinov преди 8 години
родител
ревизия
6f0fe06ba6
променени са 1 файла, в които са добавени 9 реда и са изтрити 4 реда
  1. 9
    4
      react/features/mobile/callkit/middleware.js

+ 9
- 4
react/features/mobile/callkit/middleware.js Целия файл

@@ -135,10 +135,15 @@ function _appWillMount({ dispatch, getState }, next, action) {
135 135
 function _conferenceFailed(store, next, action) {
136 136
     const result = next(action);
137 137
 
138
-    const { callUUID } = action.conference;
139
-
140
-    if (callUUID) {
141
-        CallKit.reportCallFailed(callUUID);
138
+    // XXX Certain CONFERENCE_FAILED errors are recoverable i.e. they have
139
+    // prevented the user from joining a specific conference but the app may be
140
+    // able to eventually join the conference.
141
+    if (!action.error.recoverable) {
142
+        const { callUUID } = action.conference;
143
+
144
+        if (callUUID) {
145
+            CallKit.reportCallFailed(callUUID);
146
+        }
142 147
     }
143 148
 
144 149
     return result;

Loading…
Отказ
Запис