You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-11 20:22:36 +03:00
Merge pull request #793 from matrix-org/luke/fix-guest-team-token-home-page
Fix issue where teamTokenMap was ignored for guests
This commit is contained in:
@@ -763,9 +763,11 @@ module.exports = React.createClass({
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (teamToken) {
|
if (teamToken) {
|
||||||
|
// A team member has logged in, not a guest
|
||||||
this._teamToken = teamToken;
|
this._teamToken = teamToken;
|
||||||
dis.dispatch({action: 'view_home_page'});
|
dis.dispatch({action: 'view_home_page'});
|
||||||
} else if (this._is_registered) {
|
} else if (this._is_registered) {
|
||||||
|
// The user has just logged in after registering
|
||||||
dis.dispatch({action: 'view_user_settings'});
|
dis.dispatch({action: 'view_user_settings'});
|
||||||
} else {
|
} else {
|
||||||
this._showScreenAfterLogin();
|
this._showScreenAfterLogin();
|
||||||
@@ -788,6 +790,10 @@ module.exports = React.createClass({
|
|||||||
action: 'view_room',
|
action: 'view_room',
|
||||||
room_id: localStorage.getItem('mx_last_room_id'),
|
room_id: localStorage.getItem('mx_last_room_id'),
|
||||||
});
|
});
|
||||||
|
} else if (this._teamToken) {
|
||||||
|
// Team token might be set if we're a guest.
|
||||||
|
// Guests do not call _onLoggedIn with a teamToken
|
||||||
|
dis.dispatch({action: 'view_home_page'});
|
||||||
} else {
|
} else {
|
||||||
dis.dispatch({action: 'view_room_directory'});
|
dis.dispatch({action: 'view_room_directory'});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user