diff --git a/spec/unit/matrix-client.spec.js b/spec/unit/matrix-client.spec.js index 9f67dac99..7e82fe2ac 100644 --- a/spec/unit/matrix-client.spec.js +++ b/spec/unit/matrix-client.spec.js @@ -713,7 +713,6 @@ describe("MatrixClient", function() { describe("guest rooms", function() { it("should only do /sync calls (without filter/pushrules)", function(done) { httpLookups = []; // no /pushrules or /filterw - httpLookups.push(CAPABILITIES_RESPONSE); httpLookups.push({ method: "GET", path: "/sync", diff --git a/src/client.ts b/src/client.ts index 9b7d61330..eced83d45 100644 --- a/src/client.ts +++ b/src/client.ts @@ -1041,7 +1041,9 @@ export class MatrixClient extends EventEmitter { this.syncApi.stop(); } - await this.getCapabilities(true); + if (!this.isGuest()) { + await this.getCapabilities(true); + } // shallow-copy the opts dict before modifying and storing it this.clientOpts = Object.assign({}, opts) as IStoredClientOpts;