From e2d2d63bcde7354c2e73b368e7c68d1f2b369562 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 10 Sep 2014 15:45:09 +0100 Subject: Animation on call end icon. --- webclient/app-controller.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'webclient/app-controller.js') diff --git a/webclient/app-controller.js b/webclient/app-controller.js index feda0f6b57..8383533cfb 100644 --- a/webclient/app-controller.js +++ b/webclient/app-controller.js @@ -160,13 +160,9 @@ angular.module('MatrixWebClientController', ['matrixService', 'mPresence', 'even $rootScope.onCallHangup = function(call) { if (call == $rootScope.currentCall) { - $timeout(function() { - var icon = angular.element('#callEndedIcon'); - $animate.addClass(icon, 'callIconRotate'); - $timeout(function(){ - $rootScope.currentCall = undefined; - }, 4070); - }, 100); + $timeout(function(){ + $rootScope.currentCall = undefined; + }, 4070); } } }]); -- cgit 1.4.1 From fb082cf50ff1c48f651eb46fdf7398bacb85ad16 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 11 Sep 2014 15:23:06 +0100 Subject: start towards glare support (currently not much better but no worse than before) including fixing a lot of self/var self/this fails that caused chaos when we started to have more than one call in play. --- webclient/app-controller.js | 13 ++- webclient/components/matrix/matrix-call.js | 125 ++++++++++++--------- .../components/matrix/matrix-phone-service.js | 38 ++++++- 3 files changed, 116 insertions(+), 60 deletions(-) (limited to 'webclient/app-controller.js') diff --git a/webclient/app-controller.js b/webclient/app-controller.js index 8383533cfb..945f71ed20 100644 --- a/webclient/app-controller.js +++ b/webclient/app-controller.js @@ -135,9 +135,9 @@ angular.module('MatrixWebClientController', ['matrixService', 'mPresence', 'even }); $rootScope.$on(matrixPhoneService.INCOMING_CALL_EVENT, function(ngEvent, call) { - console.trace("incoming call"); + console.log("incoming call"); if ($rootScope.currentCall && $rootScope.currentCall.state != 'ended') { - console.trace("rejecting call because we're already in a call"); + console.log("rejecting call because we're already in a call"); call.hangup(); return; } @@ -146,6 +146,13 @@ angular.module('MatrixWebClientController', ['matrixService', 'mPresence', 'even $rootScope.currentCall = call; }); + $rootScope.$on(matrixPhoneService.REPLACED_CALL_EVENT, function(ngEvent, oldCall, newCall) { + console.log("call ID "+oldCall+" has been replaced by call ID "+newCall+"!"); + newCall.onError = $scope.onCallError; + newCall.onHangup = $scope.onCallHangup; + $rootScope.currentCall = newCall; + }); + $scope.answerCall = function() { $rootScope.currentCall.answer(); }; @@ -161,7 +168,7 @@ angular.module('MatrixWebClientController', ['matrixService', 'mPresence', 'even $rootScope.onCallHangup = function(call) { if (call == $rootScope.currentCall) { $timeout(function(){ - $rootScope.currentCall = undefined; + if (call == $rootScope.currentCall) $rootScope.currentCall = undefined; }, 4070); } } diff --git a/webclient/components/matrix/matrix-call.js b/webclient/components/matrix/matrix-call.js index 68bde78862..3a692ccf5c 100644 --- a/webclient/components/matrix/matrix-call.js +++ b/webclient/components/matrix/matrix-call.js @@ -40,15 +40,6 @@ window.RTCPeerConnection = window.RTCPeerConnection || window.webkitRTCPeerConne window.RTCSessionDescription = window.RTCSessionDescription || window.webkitRTCSessionDescription || window.mozRTCSessionDescription; window.RTCIceCandidate = window.RTCIceCandidate || window.webkitRTCIceCandidate || window.mozRTCIceCandidate; -var createPeerConnection = function() { - var stunServer = 'stun:stun.l.google.com:19302'; - if (window.mozRTCPeerConnection) { - return new window.mozRTCPeerConnection({'url': stunServer}); - } else { - return new window.RTCPeerConnection({"iceServers":[{"urls":"stun:stun.l.google.com:19302"}]}); - } -} - angular.module('MatrixCall', []) .factory('MatrixCall', ['matrixService', 'matrixPhoneService', '$rootScope', function MatrixCallFactory(matrixService, matrixPhoneService, $rootScope) { var MatrixCall = function(room_id) { @@ -58,8 +49,24 @@ angular.module('MatrixCall', []) this.didConnect = false; } + MatrixCall.prototype.createPeerConnection = function() { + var stunServer = 'stun:stun.l.google.com:19302'; + var pc; + if (window.mozRTCPeerConnection) { + pc = window.mozRTCPeerConnection({'url': stunServer}); + } else { + pc = new window.RTCPeerConnection({"iceServers":[{"urls":"stun:stun.l.google.com:19302"}]}); + } + var self = this; + pc.oniceconnectionstatechange = function() { self.onIceConnectionStateChanged(); }; + pc.onsignalingstatechange = function() { self.onSignallingStateChanged(); }; + pc.onicecandidate = function(c) { self.gotLocalIceCandidate(c); }; + pc.onaddstream = function(s) { self.onAddStream(s); }; + return pc; + } + MatrixCall.prototype.placeCall = function(config) { - self = this; + var self = this; matrixPhoneService.callPlaced(this); navigator.getUserMedia({audio: config.audio, video: config.video}, function(s) { self.gotUserMediaForInvite(s); }, function(e) { self.getUserMediaFailed(e); }); this.state = 'wait_local_media'; @@ -69,22 +76,23 @@ angular.module('MatrixCall', []) MatrixCall.prototype.initWithInvite = function(msg) { this.msg = msg; - this.peerConn = createPeerConnection(); - self= this; - this.peerConn.oniceconnectionstatechange = function() { self.onIceConnectionStateChanged(); }; - this.peerConn.onicecandidate = function(c) { self.gotLocalIceCandidate(c); }; - this.peerConn.onsignalingstatechange = function() { self.onSignallingStateChanged(); }; - this.peerConn.onaddstream = function(s) { self.onAddStream(s); }; - this.peerConn.setRemoteDescription(new RTCSessionDescription(this.msg.offer), self.onSetRemoteDescriptionSuccess, self.onSetRemoteDescriptionError); + this.peerConn = this.createPeerConnection(); + this.peerConn.setRemoteDescription(new RTCSessionDescription(this.msg.offer), this.onSetRemoteDescriptionSuccess, this.onSetRemoteDescriptionError); this.state = 'ringing'; this.direction = 'inbound'; }; MatrixCall.prototype.answer = function() { - console.trace("Answering call "+this.call_id); - self = this; - navigator.getUserMedia({audio: true, video: false}, function(s) { self.gotUserMediaForAnswer(s); }, function(e) { self.getUserMediaFailed(e); }); - this.state = 'wait_local_media'; + console.log("Answering call "+this.call_id); + var self = this; + if (!this.localAVStream && !this.waitForLocalAVStream) { + navigator.getUserMedia({audio: true, video: false}, function(s) { self.gotUserMediaForAnswer(s); }, function(e) { self.getUserMediaFailed(e); }); + this.state = 'wait_local_media'; + } else if (this.localAVStream) { + this.gotUserMediaForAnswer(this.localAVStream); + } else if (this.waitForLocalAVStream) { + this.state = 'wait_local_media'; + } }; MatrixCall.prototype.stopAllMedia = function() { @@ -100,8 +108,8 @@ angular.module('MatrixCall', []) } }; - MatrixCall.prototype.hangup = function() { - console.trace("Ending call "+this.call_id); + MatrixCall.prototype.hangup = function(suppressEvent) { + console.log("Ending call "+this.call_id); this.stopAllMedia(); if (this.peerConn) this.peerConn.close(); @@ -114,24 +122,23 @@ angular.module('MatrixCall', []) }; matrixService.sendEvent(this.room_id, 'm.call.hangup', undefined, content).then(this.messageSent, this.messageSendFailed); this.state = 'ended'; - if (self.onHangup) self.onHangup(self); + if (this.onHangup && !suppressEvent) this.onHangup(this); }; MatrixCall.prototype.gotUserMediaForInvite = function(stream) { - if (!$rootScope.currentCall || $rootScope.currentCall.state == 'ended') return; + if (this.successor) { + this.successor.gotUserMediaForAnswer(stream); + return; + } + if (this.state == 'ended') return; this.localAVStream = stream; var audioTracks = stream.getAudioTracks(); for (var i = 0; i < audioTracks.length; i++) { audioTracks[i].enabled = true; } - this.peerConn = createPeerConnection(); - self = this; - this.peerConn.oniceconnectionstatechange = function() { self.onIceConnectionStateChanged(); }; - this.peerConn.onsignalingstatechange = function() { self.onSignallingStateChanged(); }; - this.peerConn.onicecandidate = function(c) { self.gotLocalIceCandidate(c); }; - this.peerConn.onaddstream = function(s) { self.onAddStream(s); }; - this.peerConn.addStream(stream); + this.peerConn = this.createPeerConnection(); + var self = this; this.peerConn.createOffer(function(d) { self.gotLocalOffer(d); }, function(e) { @@ -143,7 +150,7 @@ angular.module('MatrixCall', []) }; MatrixCall.prototype.gotUserMediaForAnswer = function(stream) { - if (!$rootScope.currentCall || $rootScope.currentCall.state == 'ended') return; + if (this.state == 'ended') return; this.localAVStream = stream; var audioTracks = stream.getAudioTracks(); @@ -151,7 +158,7 @@ angular.module('MatrixCall', []) audioTracks[i].enabled = true; } this.peerConn.addStream(stream); - self = this; + var self = this; var constraints = { 'mandatory': { 'OfferToReceiveAudio': true, @@ -165,7 +172,7 @@ angular.module('MatrixCall', []) }; MatrixCall.prototype.gotLocalIceCandidate = function(event) { - console.trace(event); + console.log(event); if (event.candidate) { var content = { version: 0, @@ -177,9 +184,9 @@ angular.module('MatrixCall', []) } MatrixCall.prototype.gotRemoteIceCandidate = function(cand) { - console.trace("Got ICE candidate from remote: "+cand); + console.log("Got ICE candidate from remote: "+cand); if (this.state == 'ended') { - console.trace("Ignoring remote ICE candidate because call has ended"); + console.log("Ignoring remote ICE candidate because call has ended"); return; } var candidateObject = new RTCIceCandidate({ @@ -190,12 +197,12 @@ angular.module('MatrixCall', []) }; MatrixCall.prototype.receivedAnswer = function(msg) { - this.peerConn.setRemoteDescription(new RTCSessionDescription(msg.answer), self.onSetRemoteDescriptionSuccess, self.onSetRemoteDescriptionError); + this.peerConn.setRemoteDescription(new RTCSessionDescription(msg.answer), this.onSetRemoteDescriptionSuccess, this.onSetRemoteDescriptionError); this.state = 'connecting'; }; MatrixCall.prototype.gotLocalOffer = function(description) { - console.trace("Created offer: "+description); + console.log("Created offer: "+description); this.peerConn.setLocalDescription(description); var content = { @@ -205,14 +212,14 @@ angular.module('MatrixCall', []) }; matrixService.sendEvent(this.room_id, 'm.call.invite', undefined, content).then(this.messageSent, this.messageSendFailed); - self = this; + var self = this; $rootScope.$apply(function() { self.state = 'invite_sent'; }); }; MatrixCall.prototype.createdAnswer = function(description) { - console.trace("Created answer: "+description); + console.log("Created answer: "+description); this.peerConn.setLocalDescription(description); var content = { version: 0, @@ -220,7 +227,7 @@ angular.module('MatrixCall', []) answer: description }; matrixService.sendEvent(this.room_id, 'm.call.answer', undefined, content).then(this.messageSent, this.messageSendFailed); - self = this; + var self = this; $rootScope.$apply(function() { self.state = 'connecting'; }); @@ -243,10 +250,10 @@ angular.module('MatrixCall', []) MatrixCall.prototype.onIceConnectionStateChanged = function() { if (this.state == 'ended') return; // because ICE can still complete as we're ending the call - console.trace("Ice connection state changed to: "+this.peerConn.iceConnectionState); + console.log("Ice connection state changed to: "+this.peerConn.iceConnectionState); // ideally we'd consider the call to be connected when we get media but chrome doesn't implement nay of the 'onstarted' events yet if (this.peerConn.iceConnectionState == 'completed' || this.peerConn.iceConnectionState == 'connected') { - self = this; + var self = this; $rootScope.$apply(function() { self.state = 'connected'; self.didConnect = true; @@ -255,19 +262,19 @@ angular.module('MatrixCall', []) }; MatrixCall.prototype.onSignallingStateChanged = function() { - console.trace("Signalling state changed to: "+this.peerConn.signalingState); + console.log("call "+this.call_id+": Signalling state changed to: "+this.peerConn.signalingState); }; MatrixCall.prototype.onSetRemoteDescriptionSuccess = function() { - console.trace("Set remote description"); + console.log("Set remote description"); }; MatrixCall.prototype.onSetRemoteDescriptionError = function(e) { - console.trace("Failed to set remote description"+e); + console.log("Failed to set remote description"+e); }; MatrixCall.prototype.onAddStream = function(event) { - console.trace("Stream added"+event); + console.log("Stream added"+event); var s = event.stream; @@ -288,14 +295,15 @@ angular.module('MatrixCall', []) }; MatrixCall.prototype.onRemoteStreamStarted = function(event) { - self = this; + var self = this; $rootScope.$apply(function() { self.state = 'connected'; }); }; MatrixCall.prototype.onRemoteStreamEnded = function(event) { - self = this; + console.log("Remote stream ended"); + var self = this; $rootScope.$apply(function() { self.state = 'ended'; self.hangupParty = 'remote'; @@ -306,18 +314,31 @@ angular.module('MatrixCall', []) }; MatrixCall.prototype.onRemoteStreamTrackStarted = function(event) { - self = this; + var self = this; $rootScope.$apply(function() { self.state = 'connected'; }); }; MatrixCall.prototype.onHangupReceived = function() { + console.log("Hangup received"); this.state = 'ended'; this.hangupParty = 'remote'; this.stopAllMedia(); this.peerConn.close(); - if (this.onHangup) this.onHangup(self); + if (this.onHangup) this.onHangup(this); + }; + + MatrixCall.prototype.replacedBy = function(newCall) { + if (this.state == 'wait_local_media') { + newCall.waitForLocalAVStream = true; + } else if (this.state == 'create_offer') { + newCall.localAVStream = this.localAVStream; + } else if (this.state == 'invite_sent') { + newCall.localAVStream = this.localAVStream; + } + this.successor = newCall; + this.hangup(true); }; return MatrixCall; diff --git a/webclient/components/matrix/matrix-phone-service.js b/webclient/components/matrix/matrix-phone-service.js index ca86b473e7..26be4bf2ad 100644 --- a/webclient/components/matrix/matrix-phone-service.js +++ b/webclient/components/matrix/matrix-phone-service.js @@ -22,6 +22,7 @@ angular.module('matrixPhoneService', []) }; matrixPhoneService.INCOMING_CALL_EVENT = "INCOMING_CALL_EVENT"; + matrixPhoneService.REPLACED_CALL_EVENT = "REPLACED_CALL_EVENT"; matrixPhoneService.allCalls = {}; matrixPhoneService.callPlaced = function(call) { @@ -38,29 +39,56 @@ angular.module('matrixPhoneService', []) call.call_id = msg.call_id; call.initWithInvite(msg); matrixPhoneService.allCalls[call.call_id] = call; - $rootScope.$broadcast(matrixPhoneService.INCOMING_CALL_EVENT, call); + + // Were we trying to call that user (room)? + var existingCall; + var callIds = Object.keys(matrixPhoneService.allCalls); + for (var i = 0; i < callIds.length; ++i) { + var thisCallId = callIds[i]; + var thisCall = matrixPhoneService.allCalls[thisCallId]; + + if (call.room_id == thisCall.room_id && thisCall.direction == 'outbound' + && (thisCall.state == 'wait_local_media' || thisCall.state == 'invite_sent' || thisCall.state == 'create_offer')) { + existingCall = thisCall; + break; + } + } + + if (existingCall) { + if (existingCall.call_id < call.call_id) { + console.log("Glare detected: rejecting incoming call "+call.call_id+" and keeping outgoing call "+existingCall.call_id); + call.hangup(); + } else { + console.log("Glare detected: answering incoming call "+call.call_id+" and canceling outgoing call "+existingCall.call_id); + existingCall.replacedBy(call); + call.answer(); + $rootScope.$broadcast(matrixPhoneService.REPLACED_CALL_EVENT, existingCall, call); + } + } else { + $rootScope.$broadcast(matrixPhoneService.INCOMING_CALL_EVENT, call); + } } else if (event.type == 'm.call.answer') { var call = matrixPhoneService.allCalls[msg.call_id]; if (!call) { - console.trace("Got answer for unknown call ID "+msg.call_id); + console.log("Got answer for unknown call ID "+msg.call_id); return; } call.receivedAnswer(msg); } else if (event.type == 'm.call.candidate') { var call = matrixPhoneService.allCalls[msg.call_id]; if (!call) { - console.trace("Got candidate for unknown call ID "+msg.call_id); + console.log("Got candidate for unknown call ID "+msg.call_id); return; } call.gotRemoteIceCandidate(msg.candidate); } else if (event.type == 'm.call.hangup') { var call = matrixPhoneService.allCalls[msg.call_id]; if (!call) { - console.trace("Got hangup for unknown call ID "+msg.call_id); + console.log("Got hangup for unknown call ID "+msg.call_id); return; } call.onHangupReceived(); - matrixPhoneService.allCalls[msg.call_id] = undefined; + delete(matrixPhoneService.allCalls[msg.call_id]); } }); -- cgit 1.4.1 From a059ca6915d05f5a5561965d9738cfaf3e20d4a1 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 11 Sep 2014 19:16:57 +0100 Subject: few fixes for errors in glare conditions. still seem to end up with no audio if both calls are placed at the same time. --- webclient/app-controller.js | 2 +- webclient/components/matrix/matrix-call.js | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'webclient/app-controller.js') diff --git a/webclient/app-controller.js b/webclient/app-controller.js index 945f71ed20..1d38b84e8e 100644 --- a/webclient/app-controller.js +++ b/webclient/app-controller.js @@ -147,7 +147,7 @@ angular.module('MatrixWebClientController', ['matrixService', 'mPresence', 'even }); $rootScope.$on(matrixPhoneService.REPLACED_CALL_EVENT, function(ngEvent, oldCall, newCall) { - console.log("call ID "+oldCall+" has been replaced by call ID "+newCall+"!"); + console.log("call ID "+oldCall.call_id+" has been replaced by call ID "+newCall.call_id+"!"); newCall.onError = $scope.onCallError; newCall.onHangup = $scope.onCallHangup; $rootScope.currentCall = newCall; diff --git a/webclient/components/matrix/matrix-call.js b/webclient/components/matrix/matrix-call.js index 2191bdab39..7407c6fd7c 100644 --- a/webclient/components/matrix/matrix-call.js +++ b/webclient/components/matrix/matrix-call.js @@ -167,9 +167,8 @@ angular.module('MatrixCall', []) }, }; this.peerConn.createAnswer(function(d) { self.createdAnswer(d); }, function(e) {}, constraints); - $rootScope.$apply(function() { - self.state = 'create_answer'; - }); + // This can't be in an apply() because it's called by a predecessor call under glare conditions :( + self.state = 'create_answer'; }; MatrixCall.prototype.gotLocalIceCandidate = function(event) { @@ -326,7 +325,7 @@ angular.module('MatrixCall', []) this.state = 'ended'; this.hangupParty = 'remote'; this.stopAllMedia(); - this.peerConn.close(); + if (this.peerConn.signalingState != 'closed') this.peerConn.close(); if (this.onHangup) this.onHangup(this); }; -- cgit 1.4.1 From 3ed39ad20e20556ce8f103d2187a5699ceac95f9 Mon Sep 17 00:00:00 2001 From: Emmanuel ROHEE Date: Fri, 12 Sep 2014 17:43:25 +0200 Subject: Clean data when user logs out --- webclient/app-controller.js | 9 +++++--- .../components/matrix/event-handler-service.js | 24 ++++++++++++++++------ webclient/home/home-controller.js | 5 +++++ webclient/recents/recents-controller.js | 9 ++++++-- 4 files changed, 36 insertions(+), 11 deletions(-) (limited to 'webclient/app-controller.js') 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"); }; diff --git a/webclient/components/matrix/event-handler-service.js b/webclient/components/matrix/event-handler-service.js index 1f32289bdf..705a5a07f2 100644 --- a/webclient/components/matrix/event-handler-service.js +++ b/webclient/components/matrix/event-handler-service.js @@ -36,13 +36,19 @@ angular.module('eventHandlerService', []) var CALL_EVENT = "CALL_EVENT"; var NAME_EVENT = "NAME_EVENT"; var TOPIC_EVENT = "TOPIC_EVENT"; + var RESET_EVENT = "RESET_EVENT"; // eventHandlerService has been resetted + + var initialSyncDeferred; + + var reset = function() { + initialSyncDeferred = $q.defer(); + + $rootScope.events = { + rooms: {} // will contain roomId: { messages:[], members:{userid1: event} } + }; + } + reset(); - var initialSyncDeferred = $q.defer(); - - $rootScope.events = { - rooms: {} // will contain roomId: { messages:[], members:{userid1: event} } - }; - // used for dedupping events - could be expanded in future... // FIXME: means that we leak memory over time (along with lots of the rest // of the app, given we never try to reap memory yet) @@ -236,6 +242,12 @@ angular.module('eventHandlerService', []) CALL_EVENT: CALL_EVENT, NAME_EVENT: NAME_EVENT, TOPIC_EVENT: TOPIC_EVENT, + RESET_EVENT: RESET_EVENT, + + reset: function() { + reset(); + $rootScope.$broadcast(RESET_EVENT); + }, handleEvent: function(event, isLiveEvent, isStateEvent) { diff --git a/webclient/home/home-controller.js b/webclient/home/home-controller.js index 85e8990c29..c0c4ea11aa 100644 --- a/webclient/home/home-controller.js +++ b/webclient/home/home-controller.js @@ -142,4 +142,9 @@ angular.module('HomeController', ['matrixService', 'eventHandlerService', 'Recen refresh(); }; + + // Clean data when user logs out + $scope.$on(eventHandlerService.RESET_EVENT, function() { + $scope.public_rooms = []; + }); }]); diff --git a/webclient/recents/recents-controller.js b/webclient/recents/recents-controller.js index b65f97439f..a0db0538f3 100644 --- a/webclient/recents/recents-controller.js +++ b/webclient/recents/recents-controller.js @@ -102,7 +102,7 @@ angular.module('RecentsController', ['matrixService', 'matrixFilter', 'eventHand } return memberCount; - } + }; $scope.onInit = function() { // Init recents list only once @@ -139,6 +139,11 @@ angular.module('RecentsController', ['matrixService', 'matrixFilter', 'eventHand } ); }; - + + // Clean data when user logs out + $scope.$on(eventHandlerService.RESET_EVENT, function() { + + delete $rootScope.rooms; + }); }]); -- cgit 1.4.1