diff --git a/src/components/structures/TimelinePanel.js b/src/components/structures/TimelinePanel.js index 6622482efc..63a52f7807 100644 --- a/src/components/structures/TimelinePanel.js +++ b/src/components/structures/TimelinePanel.js @@ -1142,7 +1142,12 @@ class TimelinePanel extends React.Component { _getEvents() { const events = this._timelineWindow.getEvents(); + + // `slice` performs a shallow copy of the array + // we want the last event to be decrypted first but displayed last + // `reverse` is destructive and unfortunately mutates the "events" array events + .slice().reverse() .forEach(event => { if (event.shouldAttemptDecryption()) { event.attemptDecryption(MatrixClientPeg.get()._crypto);