Add getCallById()

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner 2021-05-30 17:00:33 +02:00
parent f94230c292
commit 20c5735e96
No known key found for this signature in database
GPG key ID: 9760693FDD98A790

View file

@ -301,6 +301,12 @@ export default class CallHandler extends EventEmitter {
}, true); }, true);
} }
public getCallById(callId: string): MatrixCall {
for (const call of this.calls.values()) {
if (call.callId === callId) return call;
}
}
getCallForRoom(roomId: string): MatrixCall { getCallForRoom(roomId: string): MatrixCall {
return this.calls.get(roomId) || null; return this.calls.get(roomId) || null;
} }