From 0c70a67ebb4702484007a5db0f00d858e9a975b2 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 11 Nov 2020 10:47:19 +0100 Subject: [PATCH] pass platform to room as we'll need it to access crypto and creating blobs --- src/matrix/Session.js | 2 +- src/matrix/room/Room.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/matrix/Session.js b/src/matrix/Session.js index 15487ec5..ace33fa8 100644 --- a/src/matrix/Session.js +++ b/src/matrix/Session.js @@ -362,7 +362,7 @@ export class Session { pendingEvents, user: this._user, createRoomEncryption: this._createRoomEncryption, - clock: this._platform.clock + platform: this._platform }); this._rooms.add(roomId, room); return room; diff --git a/src/matrix/room/Room.js b/src/matrix/room/Room.js index 8427239c..65e3c9b4 100644 --- a/src/matrix/room/Room.js +++ b/src/matrix/room/Room.js @@ -34,7 +34,7 @@ import {DecryptionSource} from "../e2ee/common.js"; const EVENT_ENCRYPTED_TYPE = "m.room.encrypted"; export class Room extends EventEmitter { - constructor({roomId, storage, hsApi, mediaRepository, emitCollectionChange, pendingEvents, user, createRoomEncryption, getSyncToken, clock}) { + constructor({roomId, storage, hsApi, mediaRepository, emitCollectionChange, pendingEvents, user, createRoomEncryption, getSyncToken, platform}) { super(); this._roomId = roomId; this._storage = storage; @@ -52,7 +52,7 @@ export class Room extends EventEmitter { this._createRoomEncryption = createRoomEncryption; this._roomEncryption = null; this._getSyncToken = getSyncToken; - this._clock = clock; + this._platform = platform; this._observedEvents = null; } @@ -569,7 +569,7 @@ export class Room extends EventEmitter { } }, user: this._user, - clock: this._clock + clock: this._platform.clock }); if (this._roomEncryption) { this._timeline.enableEncryption(this._decryptEntries.bind(this, DecryptionSource.Timeline));