Skip to content

Commit

Permalink
Fix notifications appearing for old events (#3946)
Browse files Browse the repository at this point in the history
A method that we use for fetching recursive related events on homeservers
without MSC3981 support injects events into the timeline in timestamp
order using a special method on event-timeline-set. Injecting events using
this method could cause on-screen notifications because it incorrectly set
the 'liveEvent' flag to true if the events were added tio the live timeline.
These events are never live though as the point is that we're fetching them.
  • Loading branch information
dbkr authored Dec 7, 2023
1 parent 479c427 commit 2cd63ca
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/models/event-timeline-set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,10 @@ export class EventTimelineSet extends TypedEventEmitter<EmittedEvents, EventTime

const data: IRoomTimelineData = {
timeline: timeline,
liveEvent: timeline == this.liveTimeline,
// The purpose of this method is inserting events in the middle of the
// timeline, so the events are, by definition, not live (whether or not
// we're adding them to the live timeline).
liveEvent: false,
};
this.emit(RoomEvent.Timeline, event, this.room, false, false, data);
}
Expand Down

0 comments on commit 2cd63ca

Please sign in to comment.