simpler optional log

This commit is contained in:
Bruno Windels 2021-03-15 15:23:46 +01:00
parent 8684d6b5e5
commit 325d237302

View File

@ -163,7 +163,7 @@ export class Room extends EventEmitter {
if (this._observedEvents) { if (this._observedEvents) {
this._observedEvents.updateEvents(entries); this._observedEvents.updateEvents(entries);
} }
}, this._platform.logger, log); }, ensureLogItem(log));
return request; return request;
} }
@ -746,10 +746,10 @@ export class Room extends EventEmitter {
} }
class DecryptionRequest { class DecryptionRequest {
constructor(decryptFn, logger, log) { constructor(decryptFn, log) {
this._cancelled = false; this._cancelled = false;
this.preparation = null; this.preparation = null;
this._promise = logger.wrapOrRun(log, "decryptEntries", log => decryptFn(this, log)); this._promise = log.wrap("decryptEntries", log => decryptFn(this, log));
} }
complete() { complete() {