From 20c5735e96cc6d2ef338bf3f42ea70bec60ae535 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Sun, 30 May 2021 17:00:33 +0200 Subject: [PATCH] Add getCallById() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/CallHandler.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/CallHandler.tsx b/src/CallHandler.tsx index 90a631ab7f..c9a237f300 100644 --- a/src/CallHandler.tsx +++ b/src/CallHandler.tsx @@ -301,6 +301,12 @@ export default class CallHandler extends EventEmitter { }, true); } + public getCallById(callId: string): MatrixCall { + for (const call of this.calls.values()) { + if (call.callId === callId) return call; + } + } + getCallForRoom(roomId: string): MatrixCall { return this.calls.get(roomId) || null; }