From e85844f482c786c9a284638005de65f459cb8f3c Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 2 Mar 2021 19:16:39 +0100 Subject: [PATCH] don't redeclare retryEntries, or they won't get passed to writeSync --- src/matrix/room/Room.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/matrix/room/Room.js b/src/matrix/room/Room.js index 198652c7..dc6549a9 100644 --- a/src/matrix/room/Room.js +++ b/src/matrix/room/Room.js @@ -180,7 +180,7 @@ export class Room extends EventEmitter { // when new keys arrive, also see if any events that can now be retried to decrypt if (newKeys) { const nestedEntries = await Promise.all(newKeys.map(key => this._getRetryDecryptEntriesForKey(key, txn))); - const retryEntries = nestedEntries.reduce((allEntries, entries) => allEntries.concat(entries), []); + retryEntries = nestedEntries.reduce((allEntries, entries) => allEntries.concat(entries), []); if (retryEntries.length) { log.set("retry", retryEntries.length); events = events.concat(retryEntries.map(entry => entry.event));