Kaynağa Gözat

[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 yıl önce
ebeveyn
işleme
4f2346aac9

+ 16
- 3
react/features/authentication/middleware.js Dosyayı Görüntüle

@@ -64,14 +64,27 @@ MiddlewareRegistry.register(store => next => action => {
64 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 82
             store.dispatch(waitForOwner());
71 83
         } else {
72 84
             store.dispatch(stopWaitForOwner());
73 85
         }
74 86
         break;
87
+    }
75 88
 
76 89
     case CONFERENCE_JOINED:
77 90
         if (_isWaitingForOwner(store)) {

+ 3
- 0
react/features/room-lock/middleware.js Dosyayı Görüntüle

@@ -29,6 +29,9 @@ MiddlewareRegistry.register(store => next => action => {
29 29
 
30 30
         if (conference
31 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 35
             if (typeof error.recoverable === 'undefined') {
33 36
                 error.recoverable = true;
34 37
             }

Loading…
İptal
Kaydet