diff options
author | Emmanuel ROHEE <erohee@amdocs.com> | 2014-08-18 10:44:29 +0200 |
---|---|---|
committer | Emmanuel ROHEE <erohee@amdocs.com> | 2014-08-18 10:44:29 +0200 |
commit | 0b5674ccc5e636249f0bf746a81af814dc4c8700 (patch) | |
tree | 070929e13043f223e05280fb493b5305f5b54a72 /webclient/app.js | |
parent | Added another button to upload and send an image. (diff) | |
download | synapse-0b5674ccc5e636249f0bf746a81af814dc4c8700.tar.xz |
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.
Diffstat (limited to 'webclient/app.js')
-rw-r--r-- | webclient/app.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/webclient/app.js b/webclient/app.js index c4794e6abc..8d64db92d3 100644 --- a/webclient/app.js +++ b/webclient/app.js @@ -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"); } |