Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Fix checkForPreJoinUISI for thread roots #9803

Merged
merged 8 commits into from
Dec 21, 2022
4 changes: 3 additions & 1 deletion src/components/structures/TimelinePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1637,7 +1637,9 @@ class TimelinePanel extends React.Component<IProps, IState> {
let i = events.length - 1;
let userMembership = "leave";
for (; i >= 0; i--) {
const timeline = room.getTimelineForEvent(events[i].getId());
const timeline = isThreadTimeline
? room.getTimelineForEvent(events[i].getId()!)
: room.getUnfilteredTimelineSet().getTimelineForEvent(events[i].getId()!);
richvdh marked this conversation as resolved.
Show resolved Hide resolved
if (!timeline) {
// Somehow, it seems to be possible for live events to not have
// a timeline, even though that should not happen. :(
Expand Down