diff --git a/src/matrix/room/joinRoom.ts b/src/matrix/room/joinRoom.ts index cd2d1611..a4f3550e 100644 --- a/src/matrix/room/joinRoom.ts +++ b/src/matrix/room/joinRoom.ts @@ -24,8 +24,8 @@ import {RoomStatus} from "./common"; export async function joinRoom(roomId: string, session: Session) { try { const internalRoomId = await session.joinRoom(roomId); - const roomStatusObserver = await session.observeRoomStatus(internalRoomId); - await roomStatusObserver.waitFor((status: RoomStatus) => status === RoomStatus.Joined); + const roomStatusObservable = await session.observeRoomStatus(internalRoomId); + await roomStatusObservable.waitFor((status: RoomStatus) => status === RoomStatus.Joined); return internalRoomId; } catch (e) {