From fa30285c6bbda4f1328c4a71e66b290d38a375f1 Mon Sep 17 00:00:00 2001 From: Germain Souquet Date: Fri, 7 May 2021 15:16:54 +0100 Subject: [PATCH] Decrypt messages on when used on a timeline --- src/components/structures/TimelinePanel.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/structures/TimelinePanel.js b/src/components/structures/TimelinePanel.js index 8cc344f66b..6622482efc 100644 --- a/src/components/structures/TimelinePanel.js +++ b/src/components/structures/TimelinePanel.js @@ -1141,6 +1141,14 @@ class TimelinePanel extends React.Component { // get the list of events from the timeline window and the pending event list _getEvents() { const events = this._timelineWindow.getEvents(); + + events + .forEach(event => { + if (event.shouldAttemptDecryption()) { + event.attemptDecryption(MatrixClientPeg.get()._crypto); + } + }); + const firstVisibleEventIndex = this._checkForPreJoinUISI(events); // Hold onto the live events separately. The read receipt and read marker