From 1dbabf6240fb3175546a6ffe6ef468637c80d108 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 2 Sep 2020 14:59:17 +0200 Subject: [PATCH] cleanup ctor --- src/matrix/Session.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/matrix/Session.js b/src/matrix/Session.js index e07d0d03..503ec3a5 100644 --- a/src/matrix/Session.js +++ b/src/matrix/Session.js @@ -27,7 +27,8 @@ const PICKLE_KEY = "DEFAULT_KEY"; export class Session { // sessionInfo contains deviceId, userId and homeServer - constructor({storage, hsApi, sessionInfo, olm, clock}) { + constructor({clock, storage, hsApi, sessionInfo, olm}) { + this._clock = clock; this._storage = storage; this._hsApi = hsApi; this._syncInfo = null; @@ -36,13 +37,11 @@ export class Session { this._sendScheduler = new SendScheduler({hsApi, backoff: new RateLimitingBackoff()}); this._roomUpdateCallback = (room, params) => this._rooms.update(room.id, params); this._user = new User(sessionInfo.userId); - this._clock = clock; + this._deviceMessageHandler = new DeviceMessageHandler({storage}); this._olm = olm; this._olmUtil = null; this._e2eeAccount = null; this._deviceTracker = null; - this._olmDecryption = null; - this._deviceMessageHandler = new DeviceMessageHandler({storage}); if (olm) { this._olmUtil = new olm.Utility(); this._deviceTracker = new DeviceTracker({