Skip to content
Snippets Groups Projects
Commit 6f256e63 authored by David Baker's avatar David Baker
Browse files

reject calls if there's already a call in progress

parent 2bd43460
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment