0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-07-05 18:58:48 +02:00

reject calls if there's already a call in progress

This commit is contained in:
David Baker 2014-09-10 10:32:05 +01:00
parent 2bd4346075
commit 6f256e6380

View file

@ -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;