[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.)
This commit is contained in:
parent
8948c837d3
commit
4f2346aac9
|
@ -64,14 +64,27 @@ MiddlewareRegistry.register(store => next => action => {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case CONFERENCE_FAILED:
|
case CONFERENCE_FAILED: {
|
||||||
if (action.error.name
|
const { error } = action;
|
||||||
=== JitsiConferenceErrors.AUTHENTICATION_REQUIRED) {
|
|
||||||
|
// 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());
|
store.dispatch(waitForOwner());
|
||||||
} else {
|
} else {
|
||||||
store.dispatch(stopWaitForOwner());
|
store.dispatch(stopWaitForOwner());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case CONFERENCE_JOINED:
|
case CONFERENCE_JOINED:
|
||||||
if (_isWaitingForOwner(store)) {
|
if (_isWaitingForOwner(store)) {
|
||||||
|
|
|
@ -29,6 +29,9 @@ MiddlewareRegistry.register(store => next => action => {
|
||||||
|
|
||||||
if (conference
|
if (conference
|
||||||
&& error.name === JitsiConferenceErrors.PASSWORD_REQUIRED) {
|
&& 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') {
|
if (typeof error.recoverable === 'undefined') {
|
||||||
error.recoverable = true;
|
error.recoverable = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue