You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-26 17:03:12 +03:00
Stop using v1-prefixed /hierarchy API due to Synapse bugs (#2080)
This commit is contained in:
committed by
GitHub
parent
36906e2ddb
commit
dd0ca91aa9
@@ -50,7 +50,6 @@ import {
|
|||||||
PREFIX_IDENTITY_V2,
|
PREFIX_IDENTITY_V2,
|
||||||
PREFIX_MEDIA_R0,
|
PREFIX_MEDIA_R0,
|
||||||
PREFIX_R0,
|
PREFIX_R0,
|
||||||
PREFIX_V1,
|
|
||||||
PREFIX_UNSTABLE,
|
PREFIX_UNSTABLE,
|
||||||
retryNetworkOperation,
|
retryNetworkOperation,
|
||||||
UploadContentResponseType,
|
UploadContentResponseType,
|
||||||
@@ -8394,21 +8393,7 @@ export class MatrixClient extends EventEmitter {
|
|||||||
from: fromToken,
|
from: fromToken,
|
||||||
limit: limit?.toString(),
|
limit: limit?.toString(),
|
||||||
}, undefined, {
|
}, undefined, {
|
||||||
prefix: PREFIX_V1,
|
prefix: "/_matrix/client/unstable/org.matrix.msc2946",
|
||||||
}).catch(e => {
|
|
||||||
if (e.errcode === "M_UNRECOGNIZED") {
|
|
||||||
// fall back to the development prefix
|
|
||||||
return this.http.authedRequest<IRoomHierarchy>(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;
|
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
if (e.errcode === "M_UNRECOGNIZED") {
|
if (e.errcode === "M_UNRECOGNIZED") {
|
||||||
// fall back to the older space summary API as it exposes the same data just in a different shape.
|
// fall back to the older space summary API as it exposes the same data just in a different shape.
|
||||||
|
|||||||
Reference in New Issue
Block a user