Fix race in registration for pusher config

we no longer immediately create the MatrixClient, so don't assume we do.
This commit is contained in:
Richard van der Hoff 2017-06-19 10:22:18 +01:00
parent 115a3deed9
commit 3b518f2c59
3 changed files with 13 additions and 9 deletions

View file

@ -1280,13 +1280,14 @@ module.exports = React.createClass({
}
},
// returns a promise which resolves to the new MatrixClient
onRegistered: function(credentials, teamToken) {
// XXX: These both should be in state or ideally store(s) because we risk not
// rendering the most up-to-date view of state otherwise.
// teamToken may not be truthy
this._teamToken = teamToken;
this._is_registered = true;
Lifecycle.setLoggedIn(credentials);
return Lifecycle.setLoggedIn(credentials);
},
onFinishPostRegistration: function() {