From 4b19e3c498fa850d54817ffdbbfabf22fda5eb94 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 9 Apr 2021 16:27:25 +0200 Subject: [PATCH] remove unused member --- src/matrix/SessionContainer.js | 3 +-- src/matrix/net/HomeServerApi.js | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) 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; }