* fix: Fixes #10796 authentication in conference. * fixup! * fixup2! Co-authored-by: Saúl Ibarra Corretgé <saghul@jitsi.org>
This commit is contained in:
parent
332feefa36
commit
43ab8e3ca8
|
@ -337,7 +337,7 @@ function _mapStateToProps(state) {
|
|||
progress,
|
||||
thenableWithCancel
|
||||
} = state['features/authentication'];
|
||||
const { authRequired } = state['features/base/conference'];
|
||||
const { authRequired, conference } = state['features/base/conference'];
|
||||
const { hosts: configHosts } = state['features/base/config'];
|
||||
const {
|
||||
connecting,
|
||||
|
@ -346,7 +346,7 @@ function _mapStateToProps(state) {
|
|||
|
||||
return {
|
||||
..._abstractMapStateToProps(state),
|
||||
_conference: authRequired,
|
||||
_conference: authRequired || conference,
|
||||
_configHosts: configHosts,
|
||||
_connecting: Boolean(connecting) || Boolean(thenableWithCancel),
|
||||
_error: connectionError || authenticateAndUpgradeRoleError,
|
||||
|
|
|
@ -299,7 +299,7 @@ function mapStateToProps(state) {
|
|||
progress,
|
||||
thenableWithCancel
|
||||
} = state['features/authentication'];
|
||||
const { authRequired } = state['features/base/conference'];
|
||||
const { authRequired, conference } = state['features/base/conference'];
|
||||
const { hosts: configHosts } = state['features/base/config'];
|
||||
const {
|
||||
connecting,
|
||||
|
@ -307,7 +307,7 @@ function mapStateToProps(state) {
|
|||
} = state['features/base/connection'];
|
||||
|
||||
return {
|
||||
_conference: authRequired,
|
||||
_conference: authRequired || conference,
|
||||
_configHosts: configHosts,
|
||||
_connecting: connecting || thenableWithCancel,
|
||||
_error: connectionError || authenticateAndUpgradeRoleError,
|
||||
|
|
|
@ -19,6 +19,7 @@ import { MiddlewareRegistry } from '../base/redux';
|
|||
import {
|
||||
CANCEL_LOGIN,
|
||||
STOP_WAIT_FOR_OWNER,
|
||||
UPGRADE_ROLE_FINISHED,
|
||||
WAIT_FOR_OWNER
|
||||
} from './actionTypes';
|
||||
import {
|
||||
|
@ -61,10 +62,15 @@ MiddlewareRegistry.register(store => next => action => {
|
|||
// Go back to the app's entry point.
|
||||
_hideLoginDialog(store);
|
||||
|
||||
// FIXME Like cancelWaitForOwner, dispatch conferenceLeft to notify
|
||||
// the external-api.
|
||||
const { authRequired, conference } = getState()['features/base/conference'];
|
||||
|
||||
dispatch(appNavigate(undefined));
|
||||
// Only end the meeting if we are not already inside and trying to upgrade.
|
||||
if (authRequired && !conference) {
|
||||
// FIXME Like cancelWaitForOwner, dispatch conferenceLeft to notify
|
||||
// the external-api.
|
||||
|
||||
dispatch(appNavigate(undefined));
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -123,6 +129,15 @@ MiddlewareRegistry.register(store => next => action => {
|
|||
store.dispatch(hideDialog(WaitForOwnerDialog));
|
||||
break;
|
||||
|
||||
case UPGRADE_ROLE_FINISHED: {
|
||||
const { error, progress } = action;
|
||||
|
||||
if (!error && progress === 1) {
|
||||
_hideLoginDialog(store);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case WAIT_FOR_OWNER: {
|
||||
_clearExistingWaitForOwnerTimeout(store);
|
||||
|
||||
|
|
|
@ -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());
|
||||
|
||||
store.dispatch(maybeRedirectToWelcomePage());
|
||||
const { authRequired, conference } = getState()['features/base/conference'];
|
||||
|
||||
// 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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue