diff --git a/react/features/authentication/middleware.js b/react/features/authentication/middleware.js index a63a7323b..2cb748e21 100644 --- a/react/features/authentication/middleware.js +++ b/react/features/authentication/middleware.js @@ -64,14 +64,27 @@ MiddlewareRegistry.register(store => next => action => { break; } - case CONFERENCE_FAILED: - if (action.error.name - === JitsiConferenceErrors.AUTHENTICATION_REQUIRED) { + case CONFERENCE_FAILED: { + const { error } = action; + + // XXX The feature authentication affords recovery from + // CONFERENCE_FAILED caused by + // JitsiConferenceErrors.AUTHENTICATION_REQUIRED. + let recoverable; + + if (error.name === JitsiConferenceErrors.AUTHENTICATION_REQUIRED) { + if (typeof error.recoverable === 'undefined') { + error.recoverable = true; + } + recoverable = error.recoverable; + } + if (recoverable) { store.dispatch(waitForOwner()); } else { store.dispatch(stopWaitForOwner()); } break; + } case CONFERENCE_JOINED: if (_isWaitingForOwner(store)) { diff --git a/react/features/room-lock/middleware.js b/react/features/room-lock/middleware.js index 9b5cfd96e..9ba58b539 100644 --- a/react/features/room-lock/middleware.js +++ b/react/features/room-lock/middleware.js @@ -29,6 +29,9 @@ MiddlewareRegistry.register(store => next => action => { if (conference && error.name === JitsiConferenceErrors.PASSWORD_REQUIRED) { + // XXX The feature room-lock affords recovery after + // CONFERENCE_FAILED caused by + // JitsiConferenceErrors.PASSWORD_REQUIRED. if (typeof error.recoverable === 'undefined') { error.recoverable = true; }