Fix checkForPreJoinUISI for thread roots (#9803)

* Fix blank timeline when thread root is UTD

* add test for pre join uisi checks and thread roots

* ts strict fix

* Update to timeline panel test

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Fixes to TimelinePanel-test

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
This commit is contained in:
Germain 2022-12-21 16:03:58 +00:00 committed by GitHub
parent 134e3d7ae8
commit dd88fbbc3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 71 additions and 6 deletions

View file

@ -1637,7 +1637,7 @@ 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 = this.props.timelineSet.getTimelineForEvent(events[i].getId()!);
if (!timeline) {
// Somehow, it seems to be possible for live events to not have
// a timeline, even though that should not happen. :(