diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 8d08c19001..87cd2645db 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -991,6 +991,11 @@ module.exports = React.createClass({ this._setPage(PageTypes.UserSettings); }, + onTeamMemberRegistered: function(teamToken) { + this._teamToken = teamToken; + this._setPage(PageTypes.HomePage); + }, + onFinishPostRegistration: function() { // Don't confuse this with "PageType" which is the middle window to show this.setState({ @@ -1119,6 +1124,7 @@ module.exports = React.createClass({ customIsUrl={this.getCurrentIsUrl()} registrationUrl={this.props.registrationUrl} defaultDeviceDisplayName={this.props.defaultDeviceDisplayName} + onTeamMemberRegistered={this.onTeamMemberRegistered} onLoggedIn={this.onRegistered} onLoginClick={this.onLoginClick} onRegisterClick={this.onRegisterClick} diff --git a/src/components/structures/login/Registration.js b/src/components/structures/login/Registration.js index 4504fcce36..fe9fd30062 100644 --- a/src/components/structures/login/Registration.js +++ b/src/components/structures/login/Registration.js @@ -58,6 +58,7 @@ module.exports = React.createClass({ teamServerURL: React.PropTypes.string.isRequired, }), teamSelected: React.PropTypes.object, + onTeamMemberRegistered: React.PropTypes.func.isRequired, defaultDeviceDisplayName: React.PropTypes.string, @@ -230,6 +231,7 @@ module.exports = React.createClass({ const teamToken = data.team_token; // Store for use /w welcome pages window.localStorage.setItem('mx_team_token', teamToken); + self.props.onTeamMemberRegistered(teamToken); self._rtsClient.getTeam(teamToken).then((team) => { console.log(