summary refs log tree commit diff
path: root/webclient
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--webclient/app-controller.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/webclient/app-controller.js b/webclient/app-controller.js
index f28da87ccc..f8a0d8d35c 100644
--- a/webclient/app-controller.js
+++ b/webclient/app-controller.js
@@ -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;