fix(lock): ensure lock prompt is closed on password submit
This addresses a bug, in which submitting a password through the iframe api no longer closes RoomLockPrompt, by explicitly closing prompts for a lock or password.
This commit is contained in:
parent
e683d70a18
commit
68cad276bd
|
@ -2,6 +2,7 @@
|
|||
|
||||
import {
|
||||
CONFERENCE_FAILED,
|
||||
CONFERENCE_JOINED,
|
||||
LOCK_STATE_CHANGED,
|
||||
SET_PASSWORD_FAILED
|
||||
} from '../base/conference';
|
||||
|
@ -33,6 +34,9 @@ MiddlewareRegistry.register(store => next => action => {
|
|||
case CONFERENCE_FAILED:
|
||||
return _conferenceFailed(store, next, action);
|
||||
|
||||
case CONFERENCE_JOINED:
|
||||
return _conferenceJoined(store, next, action);
|
||||
|
||||
case LOCK_STATE_CHANGED: {
|
||||
// TODO Remove this logic when all components interested in the lock
|
||||
// state change event are moved into react/redux.
|
||||
|
@ -67,6 +71,25 @@ MiddlewareRegistry.register(store => next => action => {
|
|||
return next(action);
|
||||
});
|
||||
|
||||
/**
|
||||
* Handles cleanup of lock prompt state when a conference is joined.
|
||||
*
|
||||
* @param {Store} store - The redux store in which the specified action is being
|
||||
* dispatched.
|
||||
* @param {Dispatch} next - The redux {@code dispatch} function to dispatch the
|
||||
* specified action to the specified store.
|
||||
* @param {Action} action - The redux action {@code CONFERENCE_JOINED} which
|
||||
* specifies the details associated with joining the conference.
|
||||
* @private
|
||||
* @returns {*}
|
||||
*/
|
||||
function _conferenceJoined({ dispatch }, next, action) {
|
||||
dispatch(hideDialog(PasswordRequiredPrompt));
|
||||
dispatch(hideDialog(RoomLockPrompt));
|
||||
|
||||
return next(action);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles errors that occur when a conference fails.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue