From dcf5f947ac87bb1be3e5c80ef96fba11e49a43fc Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Mon, 2 Sep 2024 21:44:51 +0200 Subject: [PATCH 1/3] Stabilise MSC4156 Signed-off-by: Johannes Marbach --- src/client.ts | 10 ++-------- src/feature.ts | 4 ---- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/client.ts b/src/client.ts index 5bc6ab07120..57a08c55e6a 100644 --- a/src/client.ts +++ b/src/client.ts @@ -4292,13 +4292,10 @@ export class MatrixClient extends TypedEventEmitter(Method.Post, url); } - let queryParams: QueryDict = {}; + const queryParams: QueryDict = {}; if (opts.viaServers) { queryParams.server_name = opts.viaServers; queryParams.via = opts.viaServers; - if (this.canSupport.get(Feature.MigrateServerNameToVia) === ServerSupport.Unstable) { - queryParams = replaceParam("via", "org.matrix.msc4156.via", queryParams); - } } const data: IJoinRequestBody = {}; @@ -4341,13 +4338,10 @@ export class MatrixClient extends TypedEventEmitter = {}; diff --git a/src/feature.ts b/src/feature.ts index 47c914353bb..fc097676398 100644 --- a/src/feature.ts +++ b/src/feature.ts @@ -33,7 +33,6 @@ export enum Feature { AccountDataDeletion = "AccountDataDeletion", RelationsRecursion = "RelationsRecursion", IntentionalMentions = "IntentionalMentions", - MigrateServerNameToVia = "MigrateServerNameToVia", } type FeatureSupportCondition = { @@ -66,9 +65,6 @@ const featureSupportResolver: Record = { unstablePrefixes: ["org.matrix.msc3952_intentional_mentions"], matrixVersion: "v1.7", }, - [Feature.MigrateServerNameToVia]: { - unstablePrefixes: ["org.matrix.msc4156"], - }, }; export async function buildFeatureSupportMap(versions: IServerVersions): Promise> { From 59fed9cfbee1455ef6457e5767d84a15671269d1 Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Tue, 3 Sep 2024 15:49:53 +0200 Subject: [PATCH 2/3] Add deprecation comments --- src/client.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/client.ts b/src/client.ts index 57a08c55e6a..11dd189a976 100644 --- a/src/client.ts +++ b/src/client.ts @@ -4294,6 +4294,7 @@ export class MatrixClient extends TypedEventEmitter Date: Tue, 3 Sep 2024 19:15:41 +0200 Subject: [PATCH 3/3] Add minimum Matrix version --- src/client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client.ts b/src/client.ts index 11dd189a976..85a4e84f8d9 100644 --- a/src/client.ts +++ b/src/client.ts @@ -4294,7 +4294,7 @@ export class MatrixClient extends TypedEventEmitter1.11 (MSC4156) queryParams.server_name = opts.viaServers; queryParams.via = opts.viaServers; } @@ -4341,7 +4341,7 @@ export class MatrixClient extends TypedEventEmitter1.11 (MSC4156) queryParams.server_name = opts.viaServers; queryParams.via = opts.viaServers; }