diff --git a/src/matrix/SessionContainer.js b/src/matrix/SessionContainer.js index 57752309..4e17e010 100644 --- a/src/matrix/SessionContainer.js +++ b/src/matrix/SessionContainer.js @@ -109,7 +109,7 @@ export class SessionContainer { let sessionInfo; try { const request = this._platform.request; - const hsApi = new HomeServerApi({homeServer, request, createTimeout: clock.createTimeout}); + const hsApi = new HomeServerApi({homeServer, request}); const loginData = await hsApi.passwordLogin(username, password, "Hydrogen", {log}).response(); const sessionId = this.createNewSessionId(); sessionInfo = { @@ -169,7 +169,6 @@ export class SessionContainer { accessToken: sessionInfo.accessToken, request: this._platform.request, reconnector: this._reconnector, - createTimeout: clock.createTimeout }); this._sessionId = sessionInfo.id; this._storage = await this._platform.storageFactory.create(sessionInfo.id); diff --git a/src/matrix/net/HomeServerApi.js b/src/matrix/net/HomeServerApi.js index cbcb55ab..051bb44a 100644 --- a/src/matrix/net/HomeServerApi.js +++ b/src/matrix/net/HomeServerApi.js @@ -19,13 +19,12 @@ import {encodeQueryParams, encodeBody} from "./common.js"; import {HomeServerRequest} from "./HomeServerRequest.js"; export class HomeServerApi { - constructor({homeServer, accessToken, request, createTimeout, reconnector}) { + constructor({homeServer, accessToken, request, reconnector}) { // store these both in a closure somehow so it's harder to get at in case of XSS? // one could change the homeserver as well so the token gets sent there, so both must be protected from read/write this._homeserver = homeServer; this._accessToken = accessToken; this._requestFn = request; - this._createTimeout = createTimeout; this._reconnector = reconnector; }