Merge pull request #1308 from matrix-org/t3chguy/mels_fix

Change OOO so that MELS generation will continue over hidden events
This commit is contained in:
Luke Barnard 2017-08-18 13:08:35 +01:00 committed by GitHub
commit caff761df7

View File

@ -339,6 +339,15 @@ 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)) {
// If this hidden event is the RM and in or at end of a MELS put RM after MELS.
if (collapsedMxEv.getId() === this.props.readMarkerEventId) {
readMarkerInMels = true;
}
continue;
}
if (!isMembershipChange(collapsedMxEv) ||
this._wantsDateSeparator(this.props.events[i], collapsedMxEv.getDate())) {
break;
@ -349,11 +358,6 @@ module.exports = React.createClass({
readMarkerInMels = true;
}
// Ignore redacted/hidden member events
if (!this._shouldShowEvent(collapsedMxEv)) {
continue;
}
summarisedEvents.push(collapsedMxEv);
}