reject calls if there's already a call in progress
This commit is contained in:
parent
2bd4346075
commit
6f256e6380
|
@ -131,6 +131,10 @@ angular.module('MatrixWebClientController', ['matrixService', 'mPresence', 'even
|
|||
|
||||
$rootScope.$on(matrixPhoneService.INCOMING_CALL_EVENT, function(ngEvent, call) {
|
||||
console.trace("incoming call");
|
||||
if ($rootScope.currentCall && $rootScope.currentCall.state != 'ended') {
|
||||
console.trace("rejecting call because we're already in a call");
|
||||
call.hangup();
|
||||
}
|
||||
call.onError = $scope.onCallError;
|
||||
call.onHangup = $scope.onCallHangup;
|
||||
$rootScope.currentCall = call;
|
||||
|
|
Loading…
Reference in New Issue