1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-08-07 21:23:00 +03:00

Merge pull request #5421 from matrix-org/t3chguy/fix/15700

Simplify UserMenu for Guests as they can't use most of the options
This commit is contained in:
Michael Telatynski
2020-11-27 10:57:54 +00:00
committed by GitHub
4 changed files with 73 additions and 8 deletions

View File

@@ -589,9 +589,9 @@ export function logout(): void {
if (MatrixClientPeg.get().isGuest()) {
// logout doesn't work for guest sessions
// Also we sometimes want to re-log in a guest session
// if we abort the login
onLoggedOut();
// Also we sometimes want to re-log in a guest session if we abort the login.
// defer until next tick because it calls a synchronous dispatch and we are likely here from a dispatch.
setImmediate(() => onLoggedOut());
return;
}