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

Commit 4342a2a

Browse files
authored
Merge pull request #793 from matrix-org/luke/fix-guest-team-token-home-page
Fix issue where teamTokenMap was ignored for guests
2 parents 73bdfe8 + a815788 commit 4342a2a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/components/structures/MatrixChat.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,9 +763,11 @@ module.exports = React.createClass({
763763
});
764764

765765
if (teamToken) {
766+
// A team member has logged in, not a guest
766767
this._teamToken = teamToken;
767768
dis.dispatch({action: 'view_home_page'});
768769
} else if (this._is_registered) {
770+
// The user has just logged in after registering
769771
dis.dispatch({action: 'view_user_settings'});
770772
} else {
771773
this._showScreenAfterLogin();
@@ -788,6 +790,10 @@ module.exports = React.createClass({
788790
action: 'view_room',
789791
room_id: localStorage.getItem('mx_last_room_id'),
790792
});
793+
} else if (this._teamToken) {
794+
// Team token might be set if we're a guest.
795+
// Guests do not call _onLoggedIn with a teamToken
796+
dis.dispatch({action: 'view_home_page'});
791797
} else {
792798
dis.dispatch({action: 'view_room_directory'});
793799
}

0 commit comments

Comments
 (0)