Type alias EventTimelineSetHandlerMap

EventTimelineSetHandlerMap: {
    Room.timeline: ((event, room, toStartOfTimeline, removed, data) => void);
    Room.timelineReset: ((room, eventTimelineSet, resetAllTimelines) => void);
}

Type declaration

  • Room.timeline: ((event, room, toStartOfTimeline, removed, data) => void)

    Fires whenever the timeline in a room is updated.

    Example

    matrixClient.on("Room.timeline",
    function(event, room, toStartOfTimeline, removed, data) {
    if (!toStartOfTimeline && data.liveEvent) {
    var messageToAppend = room.timeline.[room.timeline.length - 1];
    }
    });
      • (event, room, toStartOfTimeline, removed, data): void
      • Parameters

        • event: MatrixEvent

          The matrix event which caused this event to fire.

        • room: Room | undefined

          The room, if any, whose timeline was updated.

        • toStartOfTimeline: boolean | undefined

          True if this event was added to the start

        • removed: boolean

          True if this event has just been removed from the timeline (beginning; oldest) of the timeline e.g. due to pagination.

        • data: IRoomTimelineData

          more data about the event

        Returns void

  • Room.timelineReset: ((room, eventTimelineSet, resetAllTimelines) => void)

    Fires whenever the live timeline in a room is reset.

    When we get a 'limited' sync (for example, after a network outage), we reset the live timeline to be empty before adding the recent events to the new timeline. This event is fired after the timeline is reset, and before the new events are added.

      • (room, eventTimelineSet, resetAllTimelines): void
      • Parameters

        • room: Room | undefined

          The room whose live timeline was reset, if any

        • eventTimelineSet: EventTimelineSet
        • resetAllTimelines: boolean

          True if all timelines were reset.

        Returns void

Generated using TypeDoc