From 53f2ad41d6874d14152ce5c524ddc4582b2faadd Mon Sep 17 00:00:00 2001
From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
Date: Thu, 10 Jul 2025 09:40:17 +0100
Subject: [PATCH] Deprecate non-functional `IJoinRoomOpts.syncRoom` (#4913)
I don't know when this last did something, but it's been a while.
---
src/@types/requests.ts | 4 +---
src/client.ts | 11 +----------
2 files changed, 2 insertions(+), 13 deletions(-)
diff --git a/src/@types/requests.ts b/src/@types/requests.ts
index dda22f2ed..f93301224 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 returned Room object will have no current state.
- * Default: true.
+ * @deprecated does nothing
*/
syncRoom?: boolean;
diff --git a/src/client.ts b/src/client.ts
index ea7f41b6e..6ee06d429 100644
--- a/src/client.ts
+++ b/src/client.ts
@@ -2369,10 +2369,6 @@ export class MatrixClient extends TypedEventEmitter {
- 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