Constructors

  • Construct a new EventContext

    An eventcontext is used for circumstances such as search results, when we have a particular event of interest, and a bunch of events before and after it.

    It also stores pagination tokens for going backwards and forwards in the timeline.

    Parameters

    • ourEvent: MatrixEvent

      the event at the centre of this context

    Returns EventContext

Properties

ourEvent: MatrixEvent

the event at the centre of this context

Methods

  • Add more events to the timeline

    Parameters

    • events: MatrixEvent[]

      new events, in timeline order

    • atStart: boolean = false

      true to insert new events at the start

    Returns void

  • Get a pagination token.

    Parameters

    • backwards: boolean = false

      true to get the pagination token for going

    Returns null | string

  • Set a pagination token.

    Generally this will be used only by the matrix js sdk.

    Parameters

    • Optionaltoken: string

      pagination token

    • backwards: boolean = false

      true to set the pagination token for going backwards in time

    Returns void