mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-18 06:35:35 +08:00
Invite the welcome user after registration if configured
This will shift focus to the welcome user DM. We probably don't want to do this for teams, but I shall leave that for another PR that fixes teams WRT to new-guest-access.
This commit is contained in:
parent
81806e23bf
commit
683f1b8a1a
@ -578,7 +578,7 @@ module.exports = React.createClass({
|
|||||||
this.setState({loggingIn: true});
|
this.setState({loggingIn: true});
|
||||||
break;
|
break;
|
||||||
case 'on_logged_in':
|
case 'on_logged_in':
|
||||||
this._onLoggedIn(payload.teamToken, payload.isPasswordStored);
|
this._onLoggedIn(payload.teamToken);
|
||||||
break;
|
break;
|
||||||
case 'on_logged_out':
|
case 'on_logged_out':
|
||||||
this._onLoggedOut();
|
this._onLoggedOut();
|
||||||
@ -801,8 +801,12 @@ module.exports = React.createClass({
|
|||||||
this._teamToken = teamToken;
|
this._teamToken = teamToken;
|
||||||
dis.dispatch({action: 'view_home_page'});
|
dis.dispatch({action: 'view_home_page'});
|
||||||
} else if (this._is_registered) {
|
} else if (this._is_registered) {
|
||||||
|
if (this.props.config.welcomeUserId) {
|
||||||
|
createRoom({dmUserId: this.props.config.welcomeUserId});
|
||||||
|
return;
|
||||||
|
}
|
||||||
// The user has just logged in after registering
|
// The user has just logged in after registering
|
||||||
dis.dispatch({action: 'view_user_settings'});
|
dis.dispatch({action: 'view_room_directory'});
|
||||||
} else {
|
} else {
|
||||||
this._showScreenAfterLogin();
|
this._showScreenAfterLogin();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user