Interface IAddEventOptions

interface IAddEventOptions {
    addToState: boolean;
    roomState?: RoomState;
    timelineWasEmpty?: boolean;
    toStartOfTimeline: boolean;
}

Hierarchy

Properties

addToState: boolean

Whether to add timeline events to the state as was done in legacy sync v2. If true then timeline events will be added to the state. In sync v2 with org.matrix.msc4222.use_state_after and simplified sliding sync, all state arrives explicitly and timeline events should not be added.

roomState?: RoomState

The state events to reconcile metadata from

timelineWasEmpty?: boolean

Whether the timeline was empty before the marker event arrived in the room. This could be happen in a variety of cases:

  1. From the initial sync
  2. It's the first state we're seeing after joining the room
  3. Or whether it's coming from syncFromCache

A marker event refers to UNSTABLE_MSC2716_MARKER and indicates that history was imported somewhere back in time. It specifically points to an MSC2716 insertion event where the history was imported at. Marker events are sent as state events so they are easily discoverable by clients and homeservers and don't get lost in timeline gaps.

toStartOfTimeline: boolean

Whether to insert the new event at the start of the timeline where the oldest events are (timeline is in chronological order, oldest to most recent)