Browse Source

[RN] CONFERENCE_FAILED with AUTHENTICATION_REQUIRED is recoverable

The feature authentication affords recovery from CONFERENCE_FAILED
caused by AUTHENTICATION_REQUIRED. (Like the feature room-lock afforded
recovery from CONFERENCE_FAILED caused by PASSWORD_REQUIRED.)
j8
Lyubo Marinov 8 years ago
parent
commit
4f2346aac9

+ 16
- 3
react/features/authentication/middleware.js View File

64
         break;
64
         break;
65
     }
65
     }
66
 
66
 
67
-    case CONFERENCE_FAILED:
68
-        if (action.error.name
69
-                === JitsiConferenceErrors.AUTHENTICATION_REQUIRED) {
67
+    case CONFERENCE_FAILED: {
68
+        const { error } = action;
69
+
70
+        // XXX The feature authentication affords recovery from
71
+        // CONFERENCE_FAILED caused by
72
+        // JitsiConferenceErrors.AUTHENTICATION_REQUIRED.
73
+        let recoverable;
74
+
75
+        if (error.name === JitsiConferenceErrors.AUTHENTICATION_REQUIRED) {
76
+            if (typeof error.recoverable === 'undefined') {
77
+                error.recoverable = true;
78
+            }
79
+            recoverable = error.recoverable;
80
+        }
81
+        if (recoverable) {
70
             store.dispatch(waitForOwner());
82
             store.dispatch(waitForOwner());
71
         } else {
83
         } else {
72
             store.dispatch(stopWaitForOwner());
84
             store.dispatch(stopWaitForOwner());
73
         }
85
         }
74
         break;
86
         break;
87
+    }
75
 
88
 
76
     case CONFERENCE_JOINED:
89
     case CONFERENCE_JOINED:
77
         if (_isWaitingForOwner(store)) {
90
         if (_isWaitingForOwner(store)) {

+ 3
- 0
react/features/room-lock/middleware.js View File

29
 
29
 
30
         if (conference
30
         if (conference
31
                 && error.name === JitsiConferenceErrors.PASSWORD_REQUIRED) {
31
                 && error.name === JitsiConferenceErrors.PASSWORD_REQUIRED) {
32
+            // XXX The feature room-lock affords recovery after
33
+            // CONFERENCE_FAILED caused by
34
+            // JitsiConferenceErrors.PASSWORD_REQUIRED.
32
             if (typeof error.recoverable === 'undefined') {
35
             if (typeof error.recoverable === 'undefined') {
33
                 error.recoverable = true;
36
                 error.recoverable = true;
34
             }
37
             }

Loading…
Cancel
Save