diff --git a/react/features/authentication/actions.js b/react/features/authentication/actions.js index ef9f3effe..c7320b55b 100644 --- a/react/features/authentication/actions.js +++ b/react/features/authentication/actions.js @@ -52,6 +52,8 @@ export function authenticateAndUpgradeRole( dispatch(_upgradeRoleFinished(error)); }); + + return process; }; } diff --git a/react/features/authentication/components/LoginDialog.native.js b/react/features/authentication/components/LoginDialog.native.js index ee29454f2..cb25a0156 100644 --- a/react/features/authentication/components/LoginDialog.native.js +++ b/react/features/authentication/components/LoginDialog.native.js @@ -216,18 +216,20 @@ class LoginDialog extends Component { * @returns {void} */ _onLogin() { - const { _conference: conference } = this.props; + const { _conference: conference, dispatch } = this.props; const { username, password } = this.state; const jid = toJid(username, this.props._configHosts); + let r; // If there's a conference it means that the connection has succeeded, // but authentication is required in order to join the room. if (conference) { - this.props.dispatch( - authenticateAndUpgradeRole(jid, password, conference)); + r = dispatch(authenticateAndUpgradeRole(jid, password, conference)); } else { - this.props.dispatch(connect(jid, password)); + r = dispatch(connect(jid, password)); } + + return r; } } diff --git a/react/features/base/connection/actions.native.js b/react/features/base/connection/actions.native.js index 8ce9d94ff..28b2ba705 100644 --- a/react/features/base/connection/actions.native.js +++ b/react/features/base/connection/actions.native.js @@ -45,7 +45,7 @@ export function connect(id: ?string, password: ?string) { JitsiConnectionEvents.CONNECTION_FAILED, _onConnectionFailed); - connection.connect({ + return connection.connect({ id, password });