diff --git a/src/commands/interface-manager/MatrixRoomReference.ts b/src/commands/interface-manager/MatrixRoomReference.ts index 602c313f..d37f3ef9 100644 --- a/src/commands/interface-manager/MatrixRoomReference.ts +++ b/src/commands/interface-manager/MatrixRoomReference.ts @@ -3,7 +3,10 @@ * All rights reserved. */ -import { Permalinks, MatrixClient, RoomAlias } from "matrix-bot-sdk"; +import { Permalinks, RoomAlias } from "matrix-bot-sdk"; + +type JoinRoom = (roomIdOrAlias: string, viaServers?: string[]) => Promise; +type ResolveRoom = (roomIdOrAlias: string) => Promise /** * This is a universal reference for a matrix room. @@ -23,7 +26,7 @@ import { Permalinks, MatrixClient, RoomAlias } from "matrix-bot-sdk"; * @param client A matrix client that should join the room. * @returns The room id that was joined. */ - public async joinClient(client: MatrixClient): Promise { + public async joinClient(client: { joinRoom: JoinRoom }): Promise { return await client.joinRoom(this.reference, this.viaServers); } @@ -56,7 +59,7 @@ import { Permalinks, MatrixClient, RoomAlias } from "matrix-bot-sdk"; * @param client A client that we can use to resolve the room alias. * @returns A new MatrixRoomReference that contains the room id. */ - public async resolve(client: MatrixClient): Promise { + public async resolve(client: { resolveRoom: ResolveRoom }): Promise { if (this.reference.startsWith('!')) { return this; } else {