mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-09-09 13:11:52 +00: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) {
|
||||
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
Block a user