diff --git a/src/@types/requests.ts b/src/@types/requests.ts index dda22f2edf8ea461fb373a9a9747880028942635..f9330122474606b734c3f385fdfb1b497eb24abb 100644 --- a/src/@types/requests.ts +++ b/src/@types/requests.ts @@ -28,9 +28,7 @@ import { type EventType, type RelationType, type RoomType } from "./event.ts"; export interface IJoinRoomOpts { /** - * True to do a room initial sync on the resulting - * room. If false, the <strong>returned Room object will have no current state. - * </strong> Default: true. + * @deprecated does nothing */ syncRoom?: boolean; diff --git a/src/client.ts b/src/client.ts index ea7f41b6e29ab7951b3ec98bf680ef5670d15dc2..6ee06d4294eaad16cca0dd5fb8517a98843a0ba9 100644 --- a/src/client.ts +++ b/src/client.ts @@ -2369,10 +2369,6 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa * @returns Rejects: with an error response. */ public async joinRoom(roomIdOrAlias: string, opts: IJoinRoomOpts = {}): Promise<Room> { - if (opts.syncRoom === undefined) { - opts.syncRoom = true; - } - const room = this.getRoom(roomIdOrAlias); if (room?.hasMembershipState(this.credentials.userId!, KnownMembership.Join)) return room; @@ -2408,12 +2404,7 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa if (resolvedRoom?.hasMembershipState(this.credentials.userId!, KnownMembership.Join)) return resolvedRoom; const syncApi = new SyncApi(this, this.clientOpts, this.buildSyncApiOptions()); - const syncRoom = syncApi.createRoom(roomId); - if (opts.syncRoom) { - // v2 will do this for us - // return syncApi.syncRoom(room); - } - return syncRoom; + return syncApi.createRoom(roomId); } /**