diff --git a/src/components/views/rooms/EventTile.tsx b/src/components/views/rooms/EventTile.tsx index 315241c074..cd4d7e39f2 100644 --- a/src/components/views/rooms/EventTile.tsx +++ b/src/components/views/rooms/EventTile.tsx @@ -1192,14 +1192,19 @@ export default class EventTile extends React.Component { } default: { - const thread = ReplyThread.makeThread( - this.props.mxEvent, - this.props.onHeightChanged, - this.props.permalinkCreator, - this.replyThread, - this.props.layout, - this.props.alwaysShowTimestamps || this.state.hover, - ); + let thread; + // When the "showHiddenEventsInTimeline" lab is enabled, + // avoid showing replies for hidden events (events without tiles) + if (haveTileForEvent(this.props.mxEvent)) { + thread = ReplyThread.makeThread( + this.props.mxEvent, + this.props.onHeightChanged, + this.props.permalinkCreator, + this.replyThread, + this.props.layout, + this.props.alwaysShowTimestamps || this.state.hover, + ); + } const isOwnEvent = this.props.mxEvent?.sender?.userId === MatrixClientPeg.get().getUserId();