summary refs log tree commit diff
path: root/webclient/components
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2014-11-03 10:33:38 +0000
committerKegan Dougal <kegan@matrix.org>2014-11-03 10:33:38 +0000
commit53da1099d132e96f9b4933a3eab1d34ba62c47d4 (patch)
treece8cbdda11b1a3eabe0ddfff7e08d161f633b8f6 /webclient/components
parentKeep matrixService stateless and make matrixFilter use modelService. (diff)
downloadsynapse-53da1099d132e96f9b4933a3eab1d34ba62c47d4.tar.xz
Make call stuff use modelService.
Diffstat (limited to 'webclient/components')
-rw-r--r--webclient/components/matrix/matrix-call.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/webclient/components/matrix/matrix-call.js b/webclient/components/matrix/matrix-call.js
index 3e8811e5fc..5a2807c755 100644
--- a/webclient/components/matrix/matrix-call.js
+++ b/webclient/components/matrix/matrix-call.js
@@ -46,7 +46,7 @@ var isWebRTCSupported = function () {
 };
 
 angular.module('MatrixCall', [])
-.factory('MatrixCall', ['matrixService', 'matrixPhoneService', '$rootScope', '$timeout', function MatrixCallFactory(matrixService, matrixPhoneService, $rootScope, $timeout) {
+.factory('MatrixCall', ['matrixService', 'matrixPhoneService', 'modelService', '$rootScope', '$timeout', function MatrixCallFactory(matrixService, matrixPhoneService, modelService, $rootScope, $timeout) {
     $rootScope.isWebRTCSupported = isWebRTCSupported();
 
     var MatrixCall = function(room_id) {
@@ -213,7 +213,7 @@ angular.module('MatrixCall', [])
 
         var self = this;
 
-        var roomMembers = $rootScope.events.rooms[this.room_id].members;
+        var roomMembers = modelService.getRoom(this.room_id).current_room_state.members;
         if (roomMembers[matrixService.config().user_id].membership != 'join') {
             console.log("We need to join the room before we can accept this call");
             matrixService.join(this.room_id).then(function() {