feat(room-lock): hide dialog when conference fails

This commit is contained in:
Saúl Ibarra Corretgé 2017-11-28 15:45:29 +01:00 committed by Lyubo Marinov
parent e28b847fb0
commit c86895ae13
1 changed files with 5 additions and 0 deletions

View File

@ -5,11 +5,13 @@ import {
LOCK_STATE_CHANGED, LOCK_STATE_CHANGED,
SET_PASSWORD_FAILED SET_PASSWORD_FAILED
} from '../base/conference'; } from '../base/conference';
import { hideDialog } from '../base/dialog';
import { JitsiConferenceErrors } from '../base/lib-jitsi-meet'; import { JitsiConferenceErrors } from '../base/lib-jitsi-meet';
import { MiddlewareRegistry } from '../base/redux'; import { MiddlewareRegistry } from '../base/redux';
import UIEvents from '../../../service/UI/UIEvents'; import UIEvents from '../../../service/UI/UIEvents';
import { _openPasswordRequiredPrompt } from './actions'; import { _openPasswordRequiredPrompt } from './actions';
import { PasswordRequiredPrompt, RoomLockPrompt } from './components';
declare var APP: Object; declare var APP: Object;
@ -38,6 +40,9 @@ MiddlewareRegistry.register(store => next => action => {
if (error.recoverable) { if (error.recoverable) {
store.dispatch(_openPasswordRequiredPrompt(conference)); store.dispatch(_openPasswordRequiredPrompt(conference));
} }
} else {
store.dispatch(hideDialog(PasswordRequiredPrompt));
store.dispatch(hideDialog(RoomLockPrompt));
} }
break; break;
} }