mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-31 15:45:04 -04:00
Do not start the event stream if the user is not logged in (=if he does not has an access token yet)
Add isUserLoggedIn to check this.
This commit is contained in:
parent
d5bebc9eaa
commit
0b5674ccc5
3 changed files with 17 additions and 9 deletions
|
@ -63,9 +63,8 @@ matrixWebClient.config(['$routeProvider', '$provide', '$httpProvider',
|
|||
}]);
|
||||
|
||||
matrixWebClient.run(['$location', 'matrixService', 'eventStreamService', function($location, matrixService, eventStreamService) {
|
||||
// If we have no persistent login information, go to the login page
|
||||
var config = matrixService.config();
|
||||
if (!config || !config.access_token) {
|
||||
// If user auth details are not in cache, go to the login page
|
||||
if (!matrixService.isUserLoggedIn()) {
|
||||
eventStreamService.stop();
|
||||
$location.path("login");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue