From 2cb5e0771b8776deafd99b2cd660343e690e85e8 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Mon, 20 Nov 2023 12:24:13 +0000 Subject: [PATCH] Reduce amount of log spam (#11898) --- src/MatrixClientPeg.ts | 5 ----- src/indexing/EventIndex.ts | 5 +---- src/stores/CallStore.ts | 1 + src/utils/exportUtils/Exporter.ts | 5 +---- 4 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/MatrixClientPeg.ts b/src/MatrixClientPeg.ts index fbc54b3896..4ea635b5b9 100644 --- a/src/MatrixClientPeg.ts +++ b/src/MatrixClientPeg.ts @@ -435,11 +435,6 @@ class MatrixClientPegClass implements IMatrixClientPeg { } this.matrixClient = createMatrixClient(opts); - - // we're going to add eventlisteners for each matrix event tile, so the - // potential number of event listeners is quite high. - this.matrixClient.setMaxListeners(500); - this.matrixClient.setGuest(Boolean(creds.guest)); const notifTimelineSet = new EventTimelineSet(undefined, { diff --git a/src/indexing/EventIndex.ts b/src/indexing/EventIndex.ts index fbc731e9a9..69cb0e1218 100644 --- a/src/indexing/EventIndex.ts +++ b/src/indexing/EventIndex.ts @@ -544,10 +544,7 @@ export default class EventIndex extends EventEmitter { const decryptionPromises = matrixEvents .filter((event) => event.isEncrypted()) .map((event) => { - return client.decryptEventIfNeeded(event, { - isRetry: true, - emit: false, - }); + return client.decryptEventIfNeeded(event, { emit: false }); }); // Let us wait for all the events to get decrypted. diff --git a/src/stores/CallStore.ts b/src/stores/CallStore.ts index c401d8c25a..c32a542133 100644 --- a/src/stores/CallStore.ts +++ b/src/stores/CallStore.ts @@ -49,6 +49,7 @@ export class CallStore extends AsyncStoreWithClient<{}> { private constructor() { super(defaultDispatcher); + this.setMaxListeners(100); // One for each RoomTile } protected async onAction(): Promise { diff --git a/src/utils/exportUtils/Exporter.ts b/src/utils/exportUtils/Exporter.ts index 575a0e34e9..9a4f3d4208 100644 --- a/src/utils/exportUtils/Exporter.ts +++ b/src/utils/exportUtils/Exporter.ts @@ -204,10 +204,7 @@ export default abstract class Exporter { const decryptionPromises = events .filter((event) => event.isEncrypted()) .map((event) => { - return this.room.client.decryptEventIfNeeded(event, { - isRetry: true, - emit: false, - }); + return this.room.client.decryptEventIfNeeded(event, { emit: false }); }); // Wait for all the events to get decrypted.