summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmmanuel ROHEE <erohee@amdocs.com>2014-08-28 11:04:01 +0200
committerEmmanuel ROHEE <erohee@amdocs.com>2014-08-28 11:04:15 +0200
commit6ac298f2f1e10890fbaabff6f79be7769fdba4be (patch)
tree4c6d614039e16f92f02d07b56a56f73a7b3e1695
parentShuffle files around in /docs (diff)
downloadsynapse-6ac298f2f1e10890fbaabff6f79be7769fdba4be.tar.xz
Start the events stream once the app starts (if credentials are in cache) or once the user gets logged in
-rw-r--r--webclient/app-controller.js2
-rw-r--r--webclient/app.js8
-rw-r--r--webclient/home/home-controller.js2
-rw-r--r--webclient/room/room-controller.js1
4 files changed, 4 insertions, 9 deletions
diff --git a/webclient/app-controller.js b/webclient/app-controller.js
index 5d3fa6ddc8..80474bb8df 100644
--- a/webclient/app-controller.js
+++ b/webclient/app-controller.js
@@ -33,7 +33,7 @@ angular.module('MatrixWebClientController', ['matrixService', 'mPresence', 'even
     });
 
     if (matrixService.isUserLoggedIn()) {
-        // eventStreamService.resume();
+        eventStreamService.resume();
         mPresence.start();
     }
     
diff --git a/webclient/app.js b/webclient/app.js
index 1d5503ebc0..2d6624ceec 100644
--- a/webclient/app.js
+++ b/webclient/app.js
@@ -79,13 +79,11 @@ matrixWebClient.config(['$routeProvider', '$provide', '$httpProvider',
         $httpProvider.interceptors.push('AccessTokenInterceptor');
     }]);
 
-matrixWebClient.run(['$location', 'matrixService', 'eventStreamService', function($location, matrixService, eventStreamService) {
+matrixWebClient.run(['$location', 'matrixService', function($location, matrixService) {
+
     // If user auth details are not in cache, go to the login page
     if (!matrixService.isUserLoggedIn()) {
-        eventStreamService.stop();
         $location.path("login");
     }
-    else {
-        // eventStreamService.resume();
-    }
+
 }]);
diff --git a/webclient/home/home-controller.js b/webclient/home/home-controller.js
index e8e91eede7..62f6ef2d95 100644
--- a/webclient/home/home-controller.js
+++ b/webclient/home/home-controller.js
@@ -45,8 +45,6 @@ angular.module('HomeController', ['matrixService', 'eventHandlerService', 'Recen
                 $scope.public_rooms = matrixService.assignRoomAliases(response.data.chunk);
             }
         );
-
-        eventStreamService.resume();
     };
     
     $scope.createNewRoom = function(room_id, isPrivate) {
diff --git a/webclient/room/room-controller.js b/webclient/room/room-controller.js
index 6c98db269e..e775d88570 100644
--- a/webclient/room/room-controller.js
+++ b/webclient/room/room-controller.js
@@ -342,7 +342,6 @@ angular.module('RoomController', ['ngSanitize', 'mFileInput', 'mUtilities'])
                             var chunk = response.data.chunk[i];
                             updateMemberList(chunk);
                         }
-                        eventStreamService.resume();
                     },
                     function(error) {
                         $scope.feedback = "Failed get member list: " + error.data.error;