remove unused member

This commit is contained in:
Bruno Windels 2021-04-09 16:27:25 +02:00
parent 4d0ad04f7b
commit 4b19e3c498
2 changed files with 2 additions and 4 deletions

View file

@ -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);

View file

@ -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;
}