Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #689 from matrix-org/luke/rts-set-team-token-view-…
Browse files Browse the repository at this point in the history
…home

View /home on registered /w team
  • Loading branch information
dbkr committed Feb 14, 2017
2 parents a21e71f + 16e3365 commit 18cba1f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/structures/MatrixChat.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -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}
Expand Down
2 changes: 2 additions & 0 deletions src/components/structures/login/Registration.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 18cba1f

Please sign in to comment.