|
|
|
@ -16,6 +16,7 @@ import { MiddlewareRegistry } from '../base/redux'; |
|
|
|
|
import { |
|
|
|
|
CANCEL_LOGIN, |
|
|
|
|
STOP_WAIT_FOR_OWNER, |
|
|
|
|
UPGRADE_ROLE_FINISHED, |
|
|
|
|
WAIT_FOR_OWNER |
|
|
|
|
} from './actionTypes'; |
|
|
|
|
import { |
|
|
|
@ -39,16 +40,23 @@ MiddlewareRegistry.register(store => next => action => { |
|
|
|
|
switch (action.type) { |
|
|
|
|
|
|
|
|
|
case CANCEL_LOGIN: { |
|
|
|
|
const { dispatch, getState } = store; |
|
|
|
|
|
|
|
|
|
if (!isDialogOpen(store, WaitForOwnerDialog)) { |
|
|
|
|
if (_isWaitingForOwner(store)) { |
|
|
|
|
store.dispatch(openWaitForOwnerDialog()); |
|
|
|
|
dispatch(openWaitForOwnerDialog()); |
|
|
|
|
|
|
|
|
|
return next(action); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
store.dispatch(hideLoginDialog()); |
|
|
|
|
dispatch(hideLoginDialog()); |
|
|
|
|
|
|
|
|
|
const { authRequired, conference } = getState()['features/base/conference']; |
|
|
|
|
|
|
|
|
|
store.dispatch(maybeRedirectToWelcomePage()); |
|
|
|
|
// Only end the meeting if we are not already inside and trying to upgrade.
|
|
|
|
|
if (authRequired && !conference) { |
|
|
|
|
dispatch(maybeRedirectToWelcomePage()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
@ -91,6 +99,15 @@ MiddlewareRegistry.register(store => next => action => { |
|
|
|
|
store.dispatch(hideDialog(WaitForOwnerDialog)); |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
case UPGRADE_ROLE_FINISHED: { |
|
|
|
|
const { error, progress } = action; |
|
|
|
|
|
|
|
|
|
if (!error && progress === 1) { |
|
|
|
|
store.dispatch(hideLoginDialog()); |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
case WAIT_FOR_OWNER: { |
|
|
|
|
_clearExistingWaitForOwnerTimeout(store); |
|
|
|
|
|
|
|
|
|