Make call stuff use modelService.

This commit is contained in:
Kegan Dougal 2014-11-03 10:33:38 +00:00
parent 395bb64b26
commit 53da1099d1
2 changed files with 5 additions and 5 deletions

View file

@ -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() {