summary refs log tree commit diff
path: root/webclient/app-controller.js
diff options
context:
space:
mode:
authorEmmanuel ROHEE <erohee@amdocs.com>2014-09-12 17:43:25 +0200
committerEmmanuel ROHEE <erohee@amdocs.com>2014-09-12 17:43:35 +0200
commit3ed39ad20e20556ce8f103d2187a5699ceac95f9 (patch)
treeec22792c12d9395046abc90da57e73dd9165e918 /webclient/app-controller.js
parentRetry sending events that fail to send. (diff)
downloadsynapse-3ed39ad20e20556ce8f103d2187a5699ceac95f9.tar.xz
Clean data when user logs out
Diffstat (limited to 'webclient/app-controller.js')
-rw-r--r--webclient/app-controller.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/webclient/app-controller.js b/webclient/app-controller.js
index 1d38b84e8e..6c3759878b 100644
--- a/webclient/app-controller.js
+++ b/webclient/app-controller.js
@@ -21,8 +21,8 @@ limitations under the License.
 'use strict';
 
 angular.module('MatrixWebClientController', ['matrixService', 'mPresence', 'eventStreamService'])
-.controller('MatrixWebClientController', ['$scope', '$location', '$rootScope', '$timeout', '$animate', 'matrixService', 'mPresence', 'eventStreamService', 'matrixPhoneService',
-                               function($scope, $location, $rootScope, $timeout, $animate, matrixService, mPresence, eventStreamService, matrixPhoneService) {
+.controller('MatrixWebClientController', ['$scope', '$location', '$rootScope', '$timeout', '$animate', 'matrixService', 'mPresence', 'eventStreamService', 'eventHandlerService', 'matrixPhoneService',
+                               function($scope, $location, $rootScope, $timeout, $animate, matrixService, mPresence, eventStreamService, eventHandlerService, matrixPhoneService) {
          
     // Check current URL to avoid to display the logout button on the login page
     $scope.location = $location.path();
@@ -73,7 +73,10 @@ angular.module('MatrixWebClientController', ['matrixService', 'mPresence', 'even
         // Clean permanent data
         matrixService.setConfig({});
         matrixService.saveConfig();
-        
+
+        // Reset cached data
+        eventHandlerService.reset();
+
         // And go to the login page
         $location.url("login");
     };