diff --git a/src/components/structures/MessagePanel.js b/src/components/structures/MessagePanel.js index 02f224e942..a9a14c0870 100644 --- a/src/components/structures/MessagePanel.js +++ b/src/components/structures/MessagePanel.js @@ -339,6 +339,11 @@ module.exports = React.createClass({ for (;i + 1 < this.props.events.length; i++) { const collapsedMxEv = this.props.events[i + 1]; + // Ignore redacted/hidden member events + if (!this._shouldShowEvent(collapsedMxEv)) { + continue; + } + if (!isMembershipChange(collapsedMxEv) || this._wantsDateSeparator(this.props.events[i], collapsedMxEv.getDate())) { break; @@ -349,11 +354,6 @@ module.exports = React.createClass({ readMarkerInMels = true; } - // Ignore redacted/hidden member events - if (!this._shouldShowEvent(collapsedMxEv)) { - continue; - } - summarisedEvents.push(collapsedMxEv); }