From b1dbfbba228502664c9d6ade5ae3bf11bf42e10d Mon Sep 17 00:00:00 2001 From: gnuxie Date: Fri, 16 Feb 2024 14:36:43 +0000 Subject: [PATCH] use MPS `ClientPlatform` to use preemptive joiner in Rooms commands. --- src/commands/Rooms.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/commands/Rooms.tsx b/src/commands/Rooms.tsx index 9ca427ef..aabbaccd 100644 --- a/src/commands/Rooms.tsx +++ b/src/commands/Rooms.tsx @@ -83,7 +83,8 @@ defineInterfaceCommand({ } ]), command: async function (this: DraupnirContext, _keywords, roomRef: MatrixRoomReference): Promise> { - const room = await resolveRoomReferenceSafe(this.client, roomRef); + const joiner = this.clientPlatform.toRoomJoiner(); + const room = await joiner.joinRoom(roomRef); if (isError(room)) { return room.elaborate( `The homeserver that Draupnir is hosted on cannot join this room using the room reference provided.\