Merge pull request #628 from matrix-org/luke/feature-team-reg-auto-join-rooms

Implement auto-join rooms on registration
This commit is contained in:
David Baker 2017-01-19 11:44:37 +00:00 committed by GitHub
commit 9e0c7a11d0
2 changed files with 30 additions and 1 deletions

View file

@ -116,10 +116,14 @@ module.exports = React.createClass({
},
_doSubmit: function() {
let email = this.refs.email.value.trim();
if (this.state.selectedTeam) {
email += "@" + this.state.selectedTeam.emailSuffix;
}
var promise = this.props.onRegisterClick({
username: this.refs.username.value.trim() || this.props.guestUsername,
password: this.refs.password.value.trim(),
email: this.refs.email.value.trim()
email: email,
});
if (promise) {