From e997676ae23cb8117cc2f2bebe26b17f29b4b5a1 Mon Sep 17 00:00:00 2001 From: Germain Date: Thu, 17 Feb 2022 17:34:20 +0000 Subject: [PATCH] Opt out from check for pre-join UISI for threads (#7834) --- src/components/structures/TimelinePanel.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/structures/TimelinePanel.tsx b/src/components/structures/TimelinePanel.tsx index 9a822ef18d..aa81c7c63d 100644 --- a/src/components/structures/TimelinePanel.tsx +++ b/src/components/structures/TimelinePanel.tsx @@ -1331,8 +1331,12 @@ class TimelinePanel extends React.Component { private checkForPreJoinUISI(events: MatrixEvent[]): number { const room = this.props.timelineSet.room; - if (events.length === 0 || !room || - !MatrixClientPeg.get().isRoomEncrypted(room.roomId)) { + const isThreadTimeline = [TimelineRenderingType.Thread, TimelineRenderingType.ThreadsList] + .includes(this.context.timelineRenderingType); + if (events.length === 0 + || !room + || !MatrixClientPeg.get().isRoomEncrypted(room.roomId) + || isThreadTimeline) { return 0; }