diff --git a/src/client.ts b/src/client.ts index 5bc6ab071..85a4e84f8 100644 --- a/src/client.ts +++ b/src/client.ts @@ -4292,13 +4292,11 @@ export class MatrixClient extends TypedEventEmitter(Method.Post, url); } - let queryParams: QueryDict = {}; + const queryParams: QueryDict = {}; if (opts.viaServers) { + // server_name has been deprecated in favour of via with Matrix >1.11 (MSC4156) 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 +4339,11 @@ export class MatrixClient extends TypedEventEmitter1.11 (MSC4156) 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 body: Record = {}; diff --git a/src/feature.ts b/src/feature.ts index 47c914353..fc0976763 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> {