From 5cc565a2fcee8ebfbdac81097733de8f62e25c57 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 17 Dec 2021 15:18:51 +0000 Subject: [PATCH] Stop using v1-prefixed /hierarchy API due to Synapse bugs --- src/client.ts | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/client.ts b/src/client.ts index bd3a631fe70..8f0a0da9549 100644 --- a/src/client.ts +++ b/src/client.ts @@ -50,7 +50,6 @@ import { PREFIX_IDENTITY_V2, PREFIX_MEDIA_R0, PREFIX_R0, - PREFIX_V1, PREFIX_UNSTABLE, retryNetworkOperation, UploadContentResponseType, @@ -8394,21 +8393,7 @@ export class MatrixClient extends EventEmitter { from: fromToken, limit: limit?.toString(), }, undefined, { - prefix: PREFIX_V1, - }).catch(e => { - if (e.errcode === "M_UNRECOGNIZED") { - // fall back to the development prefix - return this.http.authedRequest(undefined, Method.Get, path, { - suggested_only: String(suggestedOnly), - max_depth: String(maxDepth), - from: fromToken, - limit: String(limit), - }, undefined, { - prefix: "/_matrix/client/unstable/org.matrix.msc2946", - }); - } - - throw e; + prefix: "/_matrix/client/unstable/org.matrix.msc2946", }).catch(e => { if (e.errcode === "M_UNRECOGNIZED") { // fall back to the older space summary API as it exposes the same data just in a different shape.