diff options
author | David Baker <dbkr@matrix.org> | 2014-09-10 10:32:05 +0100 |
---|---|---|
committer | David Baker <dbkr@matrix.org> | 2014-09-10 10:32:05 +0100 |
commit | 6f256e6380e4cb278af5dd5ae57460f0da2b2cf1 (patch) | |
tree | 6adbeb2ac61b4ce907e409b90d9ae30a95d85b88 | |
parent | More rst formatting. (diff) | |
download | synapse-6f256e6380e4cb278af5dd5ae57460f0da2b2cf1.tar.xz |
reject calls if there's already a call in progress
-rw-r--r-- | webclient/app-controller.js | 4 |
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; |