Merge pull request #201 from matrix-org/dbkr/reuse_guest_account

Use the guest access tokens sent in 3pid invite emails.
pull/21833/head
David Baker 2016-03-09 15:49:30 +00:00
commit d54ee4f247
1 changed files with 12 additions and 0 deletions

View File

@ -99,6 +99,18 @@ module.exports = React.createClass({
console.log("Not registering as guest; registration.");
this._autoRegisterAsGuest = false;
}
else if (this.props.startingQueryParams.guest_user_id &&
this.props.startingQueryParams.guest_access_token)
{
this._autoRegisterAsGuest = false;
this.onLoggedIn({
userId: this.props.startingQueryParams.guest_user_id,
accessToken: this.props.startingQueryParams.guest_access_token,
homeserverUrl: this.props.config.default_hs_url,
identityServerUrl: this.props.config.default_is_url,
guest: true
});
}
else {
this._autoRegisterAsGuest = true;
}