You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-12 12:41:46 +03:00
Toggle auto-reg off when successfully registered as a guest.
Otherwise if you refresh -> auto-reg -> logout, you will get an infinite spinner as it will think it is auto-registering again.
This commit is contained in:
@ -152,6 +152,7 @@ module.exports = React.createClass({
|
|||||||
);
|
);
|
||||||
MatrixClientPeg.get().registerGuest().done(function(creds) {
|
MatrixClientPeg.get().registerGuest().done(function(creds) {
|
||||||
console.log("Registered as guest: %s", creds.user_id);
|
console.log("Registered as guest: %s", creds.user_id);
|
||||||
|
self._setAutoRegisterAsGuest(false);
|
||||||
self.onLoggedIn({
|
self.onLoggedIn({
|
||||||
userId: creds.user_id,
|
userId: creds.user_id,
|
||||||
accessToken: creds.access_token,
|
accessToken: creds.access_token,
|
||||||
@ -185,7 +186,6 @@ module.exports = React.createClass({
|
|||||||
MatrixClientPeg.get().stopClient();
|
MatrixClientPeg.get().stopClient();
|
||||||
MatrixClientPeg.get().removeAllListeners();
|
MatrixClientPeg.get().removeAllListeners();
|
||||||
MatrixClientPeg.unset();
|
MatrixClientPeg.unset();
|
||||||
|
|
||||||
this.notifyNewScreen('login');
|
this.notifyNewScreen('login');
|
||||||
this.replaceState({
|
this.replaceState({
|
||||||
logged_in: false,
|
logged_in: false,
|
||||||
|
Reference in New Issue
Block a user