summary refs log tree commit diff
path: root/webclient/app-controller.js
diff options
context:
space:
mode:
authorKegsay <kegsay@gmail.com>2014-11-04 15:44:58 +0000
committerKegsay <kegsay@gmail.com>2014-11-04 15:44:58 +0000
commit020fc15d9823c94c48fa79f2ffff7310f891a19d (patch)
treec0945f4ec2c7acbbf28a888a3d6623ee486ca714 /webclient/app-controller.js
parentDon't need this; should be on -g path. (diff)
parentSYWEB-116: Implement historical display name support. (diff)
downloadsynapse-020fc15d9823c94c48fa79f2ffff7310f891a19d.tar.xz
Merge pull request #11 from matrix-org/webclient-room-data-restructure
Webclient room data restructure
Diffstat (limited to 'webclient/app-controller.js')
-rw-r--r--webclient/app-controller.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/webclient/app-controller.js b/webclient/app-controller.js
index e4b7cd286f..2d82a42cf8 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', 'eventHandlerService', 'matrixPhoneService',
-                               function($scope, $location, $rootScope, $timeout, $animate, matrixService, mPresence, eventStreamService, eventHandlerService, matrixPhoneService) {
+.controller('MatrixWebClientController', ['$scope', '$location', '$rootScope', '$timeout', '$animate', 'matrixService', 'mPresence', 'eventStreamService', 'eventHandlerService', 'matrixPhoneService', 'modelService',
+                               function($scope, $location, $rootScope, $timeout, $animate, matrixService, mPresence, eventStreamService, eventHandlerService, matrixPhoneService, modelService) {
          
     // Check current URL to avoid to display the logout button on the login page
     $scope.location = $location.path();
@@ -117,7 +117,7 @@ angular.module('MatrixWebClientController', ['matrixService', 'mPresence', 'even
             return;
         }
 
-        var roomMembers = angular.copy($rootScope.events.rooms[$rootScope.currentCall.room_id].members);
+        var roomMembers = angular.copy(modelService.getRoom($rootScope.currentCall.room_id).current_room_state.members);
         delete roomMembers[matrixService.config().user_id];
 
         $rootScope.currentCall.user_id = Object.keys(roomMembers)[0];