Merge pull request #431 in FS/freeswitch from ~JMESQUITA/freeswitch:bugfix/FS-7995-members-list-shows-duplicate-members to master

* commit 'f01c85743cf9d1ae9f45174c60ee3b27f75e4d85':
  FS-7995 [verto_communicator] #resolve upon call recovery, emit an event on $rootScope so that controllers are able to properly clear states.Right now clearing chat state.
This commit is contained in:
Ítalo Rossi 2015-08-24 17:32:02 -05:00
commit dad61c3d3a
2 changed files with 13 additions and 0 deletions

View File

@ -507,6 +507,11 @@ vertoControllers.controller('ChatController', ['$scope', '$rootScope', '$http',
}); });
}); });
$rootScope.$on('call.recovering', function(event){
console.log('Our current call is recovering, clear the participant list.');
$scope.members = [];
});
function findMemberByUUID(uuid) { function findMemberByUUID(uuid) {
var found = false; var found = false;
for (var idx in $scope.members) { for (var idx in $scope.members) {

View File

@ -170,6 +170,10 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
$rootScope.$emit('call.incoming', number); $rootScope.$emit('call.incoming', number);
} }
function recoveringCall() {
$rootScope.$emit('call.recovering');
}
function getVideoParams() { function getVideoParams() {
var maxWidth, maxHeight; var maxWidth, maxHeight;
@ -500,6 +504,10 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
data.callState = 'active'; data.callState = 'active';
calling(); calling();
break; break;
case "recovering":
console.debug('We are recovering a call!');
recoveringCall();
break;
case "active": case "active":
console.debug('Talking to:', d.cidString()); console.debug('Talking to:', d.cidString());
data.callState = 'active'; data.callState = 'active';