diff --git a/spec/unit/matrix-client.spec.ts b/spec/unit/matrix-client.spec.ts index f9fab0864ba..ac43580913a 100644 --- a/spec/unit/matrix-client.spec.ts +++ b/spec/unit/matrix-client.spec.ts @@ -3012,4 +3012,22 @@ describe("MatrixClient", function () { expect(result).toEqual({}); }); }); + + describe("getAuthIssuer", () => { + it("should use unstable prefix", async () => { + httpLookups = [ + { + method: "GET", + path: `/auth_issuer`, + data: { + issuer: "https://issuer/", + }, + prefix: "/_matrix/client/unstable/org.matrix.msc2965", + }, + ]; + + await expect(client.getAuthIssuer()).resolves.toEqual({ issuer: "https://issuer/" }); + expect(httpLookups.length).toEqual(0); + }); + }); }); diff --git a/src/client.ts b/src/client.ts index b08598913cb..15fc1a99429 100644 --- a/src/client.ts +++ b/src/client.ts @@ -9974,6 +9974,20 @@ export class MatrixClient extends TypedEventEmitter { + return this.http.request(Method.Get, "/auth_issuer", undefined, undefined, { + prefix: ClientPrefix.Unstable + "/org.matrix.msc2965", + }); + } } /**