From d3b1ec0648f3f5db4bc3b6f494ba70c0a2bb6904 Mon Sep 17 00:00:00 2001
From: David Baker <dave@matrix.org>
Date: Tue, 1 Dec 2020 15:08:59 +0000
Subject: [PATCH] Revert unintentional part of
 4ca35fabefe5ada2edcc631f9f6ec84b12b2e30b

---
 src/CallHandler.tsx | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/CallHandler.tsx b/src/CallHandler.tsx
index 544eb0851d..3be203ab98 100644
--- a/src/CallHandler.tsx
+++ b/src/CallHandler.tsx
@@ -477,18 +477,20 @@ export default class CallHandler {
                 break;
             case 'incoming_call':
                 {
+                    if (this.getAnyActiveCall()) {
+                        // ignore multiple incoming calls. in future, we may want a line-1/line-2 setup.
+                        // we avoid rejecting with "busy" in case the user wants to answer it on a different device.
+                        // in future we could signal a "local busy" as a warning to the caller.
+                        // see https://github.com/vector-im/vector-web/issues/1964
+                        return;
+                    }
+
                     // if the runtime env doesn't do VoIP, stop here.
                     if (!MatrixClientPeg.get().supportsVoip()) {
                         return;
                     }
 
                     const call = payload.call as MatrixCall;
-
-                    if (this.getCallForRoom(call.roomId)) {
-                        // ignore multiple incoming calls to the same room
-                        return;
-                    }
-
                     Analytics.trackEvent('voip', 'receiveCall', 'type', call.type);
                     this.calls.set(call.roomId, call)
                     this.setCallListeners(call);