Add getCallById()

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
pull/21833/head
Š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
1 changed files with 6 additions and 0 deletions

View File

@ -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;
}