diff options
Diffstat (limited to 'webclient/app.js')
-rw-r--r-- | webclient/app.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/webclient/app.js b/webclient/app.js index 0b613fa206..6e0351067f 100644 --- a/webclient/app.js +++ b/webclient/app.js @@ -20,7 +20,9 @@ var matrixWebClient = angular.module('matrixWebClient', [ 'LoginController', 'RoomController', 'RoomsController', - 'matrixService' + 'matrixService', + 'eventStreamService', + 'eventHandlerService' ]); matrixWebClient.config(['$routeProvider', '$provide', '$httpProvider', @@ -59,12 +61,16 @@ matrixWebClient.config(['$routeProvider', '$provide', '$httpProvider', $httpProvider.interceptors.push('AccessTokenInterceptor'); }]); -matrixWebClient.run(['$location', 'matrixService' , function($location, matrixService) { +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) { + eventStreamService.stop(); $location.path("login"); } + else { + eventStreamService.resume(); + } }]); matrixWebClient |