diff --git a/src/stores/CallStore.ts b/src/stores/CallStore.ts index 5ebc51bcf5f3..9338ea7db0d0 100644 --- a/src/stores/CallStore.ts +++ b/src/stores/CallStore.ts @@ -179,8 +179,8 @@ export class CallStore extends AsyncStoreWithClient<{}> { * @param roomId The room's ID. * @returns The active call. */ - public async getActiveCall(roomId: string): Promise { - const call = await this.getCall(roomId); + public getActiveCall(roomId: string): Call | null { + const call = this.getCall(roomId); return call !== null && this.activeCalls.has(call) ? call : null; } diff --git a/src/stores/RoomViewStore.tsx b/src/stores/RoomViewStore.tsx index 795813c9ec89..dfe910d57f18 100644 --- a/src/stores/RoomViewStore.tsx +++ b/src/stores/RoomViewStore.tsx @@ -473,7 +473,7 @@ export class RoomViewStore extends EventEmitter { payload.view_call ?? (payload.room_id === this.state.roomId ? this.state.viewingCall - : (await CallStore.instance.getActiveCall(payload.room_id)) !== null), + : CallStore.instance.getActiveCall(payload.room_id) !== null), }; // Allow being given an event to be replied to when switching rooms but sanity check its for this room