Skip to content

Commit bd47667

Browse files
author
Germain
authored
Remove getCapabilities call for guest users (#2100)
1 parent cfd865b commit bd47667

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

spec/unit/matrix-client.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,6 @@ describe("MatrixClient", function() {
713713
describe("guest rooms", function() {
714714
it("should only do /sync calls (without filter/pushrules)", function(done) {
715715
httpLookups = []; // no /pushrules or /filterw
716-
httpLookups.push(CAPABILITIES_RESPONSE);
717716
httpLookups.push({
718717
method: "GET",
719718
path: "/sync",

src/client.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,9 @@ export class MatrixClient extends EventEmitter {
10411041
this.syncApi.stop();
10421042
}
10431043

1044-
await this.getCapabilities(true);
1044+
if (!this.isGuest()) {
1045+
await this.getCapabilities(true);
1046+
}
10451047

10461048
// shallow-copy the opts dict before modifying and storing it
10471049
this.clientOpts = Object.assign({}, opts) as IStoredClientOpts;

0 commit comments

Comments
 (0)