Skip to content

Commit

Permalink
Fix timeline search in MSC3089 getFileEvent() (#2085)
Browse files Browse the repository at this point in the history
  • Loading branch information
hughns authored Dec 23, 2021
1 parent 9945169 commit ab19480
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/models/MSC3089Branch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export class MSC3089Branch {
let event: MatrixEvent | undefined = room.getUnfilteredTimelineSet().findEventById(this.id);

// keep scrolling back if needed until we find the event or reach the start of the room:
while (!event && room.getLiveTimeline().getState(EventTimeline.FORWARDS).paginationToken) {
while (!event && room.getLiveTimeline().getState(EventTimeline.BACKWARDS).paginationToken) {
await this.client.scrollback(room, 100);
event = room.getUnfilteredTimelineSet().findEventById(this.id);
}
Expand Down

0 comments on commit ab19480

Please sign in to comment.