mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-12 03:14:19 -05:00
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) {
|
$rootScope.$on(matrixPhoneService.INCOMING_CALL_EVENT, function(ngEvent, call) {
|
||||||
console.trace("incoming 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.onError = $scope.onCallError;
|
||||||
call.onHangup = $scope.onCallHangup;
|
call.onHangup = $scope.onCallHangup;
|
||||||
$rootScope.currentCall = call;
|
$rootScope.currentCall = call;
|
||||||
|
Loading…
Reference in New Issue
Block a user