|
@@ -216,18 +216,20 @@ class LoginDialog extends Component {
|
216
|
216
|
* @returns {void}
|
217
|
217
|
*/
|
218
|
218
|
_onLogin() {
|
219
|
|
- const { _conference: conference } = this.props;
|
|
219
|
+ const { _conference: conference, dispatch } = this.props;
|
220
|
220
|
const { username, password } = this.state;
|
221
|
221
|
const jid = toJid(username, this.props._configHosts);
|
|
222
|
+ let r;
|
222
|
223
|
|
223
|
224
|
// If there's a conference it means that the connection has succeeded,
|
224
|
225
|
// but authentication is required in order to join the room.
|
225
|
226
|
if (conference) {
|
226
|
|
- this.props.dispatch(
|
227
|
|
- authenticateAndUpgradeRole(jid, password, conference));
|
|
227
|
+ r = dispatch(authenticateAndUpgradeRole(jid, password, conference));
|
228
|
228
|
} else {
|
229
|
|
- this.props.dispatch(connect(jid, password));
|
|
229
|
+ r = dispatch(connect(jid, password));
|
230
|
230
|
}
|
|
231
|
+
|
|
232
|
+ return r;
|
231
|
233
|
}
|
232
|
234
|
}
|
233
|
235
|
|