From 8684d6b5e5361ded31830ac561d9b6c3fe559e6a Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 15 Mar 2021 15:23:35 +0100 Subject: [PATCH] some fixes --- src/logging/NullLogger.js | 3 ++- src/matrix/e2ee/RoomEncryption.js | 2 +- src/matrix/room/Room.js | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/logging/NullLogger.js b/src/logging/NullLogger.js index b6e47d59..1860e697 100644 --- a/src/logging/NullLogger.js +++ b/src/logging/NullLogger.js @@ -17,7 +17,6 @@ import {LogLevel} from "./LogFilter.js"; function noop () {} -export const Instance = new NullLogger(); export class NullLogger { constructor() { @@ -90,3 +89,5 @@ class NullLogItem { finish() {} } + +export const Instance = new NullLogger(); diff --git a/src/matrix/e2ee/RoomEncryption.js b/src/matrix/e2ee/RoomEncryption.js index 7af65553..de12fc1d 100644 --- a/src/matrix/e2ee/RoomEncryption.js +++ b/src/matrix/e2ee/RoomEncryption.js @@ -152,7 +152,7 @@ export class RoomEncryption { })); } - log.refDetached("check key backup", async log => { + log.wrapDetached("check key backup", async log => { // if the message came from sync, wait 10s to see if the room key arrives late, // and only after that proceed to request from backup log.set("source", source); diff --git a/src/matrix/room/Room.js b/src/matrix/room/Room.js index a88250f0..967cb8b2 100644 --- a/src/matrix/room/Room.js +++ b/src/matrix/room/Room.js @@ -126,7 +126,7 @@ export class Room extends EventEmitter { * Used for decrypting when loading/filling the timeline, and retrying decryption, * not during sync, where it is split up during the multiple phases. */ - _decryptEntries(source, entries, inboundSessionTxn = null, log = null) { + _decryptEntries(source, entries, inboundSessionTxn, log = null) { const request = new DecryptionRequest(async (r, log) => { if (!inboundSessionTxn) { inboundSessionTxn = await this._storage.readTxn([this._storage.storeNames.inboundGroupSessions]); @@ -511,7 +511,7 @@ export class Room extends EventEmitter { } await txn.complete(); if (this._roomEncryption) { - const decryptRequest = this._decryptEntries(DecryptionSource.Timeline, gapResult.entries, log); + const decryptRequest = this._decryptEntries(DecryptionSource.Timeline, gapResult.entries, null, log); await decryptRequest.complete(); } // once txn is committed, update in-memory state & emit events