diff --git a/src/components/structures/MessagePanel.js b/src/components/structures/MessagePanel.js index 3c0e486e22..a97041a712 100644 --- a/src/components/structures/MessagePanel.js +++ b/src/components/structures/MessagePanel.js @@ -241,12 +241,15 @@ module.exports = React.createClass({ // TODO: Implement granular (per-room) hide options _shouldShowEvent: function(mxEv) { - console.log("_shouldShowEvent " + mxEv.getId()); + console.log("_shouldShowEvent ", mxEv.getId(), mxEv); const EventTile = sdk.getComponent('rooms.EventTile'); if (!EventTile.haveTileForEvent(mxEv)) { return false; // no tile = no show } + // Always show highlighted event + if (this.props.highlightedEventId === mxEv.getId()) return true; + const isMemberEvent = mxEv.getType() === "m.room.member" && mxEv.getStateKey() !== undefined; if (!isMemberEvent) { return true; // bail early: all the checks below concern member events only @@ -365,7 +368,7 @@ module.exports = React.createClass({ let collapsedMxEv = this.props.events[i + 1]; // Ignore redacted member events - if (!EventTile.haveTileForEvent(collapsedMxEv)) { + if (!EventTile.haveTileForEvent(collapsedMxEv) || !this._shouldShowEvent(collapsedMxEv)) { continue; }