From 325d23730267b4355956041d452a1f299ece620e Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 15 Mar 2021 15:23:46 +0100 Subject: [PATCH] simpler optional log --- src/matrix/room/Room.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/matrix/room/Room.js b/src/matrix/room/Room.js index 967cb8b2..5e3ef643 100644 --- a/src/matrix/room/Room.js +++ b/src/matrix/room/Room.js @@ -163,7 +163,7 @@ export class Room extends EventEmitter { if (this._observedEvents) { this._observedEvents.updateEvents(entries); } - }, this._platform.logger, log); + }, ensureLogItem(log)); return request; } @@ -746,10 +746,10 @@ export class Room extends EventEmitter { } class DecryptionRequest { - constructor(decryptFn, logger, log) { + constructor(decryptFn, log) { this._cancelled = false; this.preparation = null; - this._promise = logger.wrapOrRun(log, "decryptEntries", log => decryptFn(this, log)); + this._promise = log.wrap("decryptEntries", log => decryptFn(this, log)); } complete() {