Type Alias EventTimelineSetHandlerMap

EventTimelineSetHandlerMap: {
    "Room.timeline": (
        event: MatrixEvent,
        room: Room | undefined,
        toStartOfTimeline: boolean | undefined,
        removed: boolean,
        data: IRoomTimelineData,
    ) => void;
    "Room.timelineReset": (
        room: Room | undefined,
        timelineSet: EventTimelineSet,
        resetAllTimelines: boolean,
    ) => void;
}

Type declaration

  • Room.timeline: (
        event: MatrixEvent,
        room: Room | undefined,
        toStartOfTimeline: boolean | undefined,
        removed: boolean,
        data: IRoomTimelineData,
    ) => void

    Fires whenever the timeline in a room is updated.

    matrixClient.on("Room.timeline",
    function(event, room, toStartOfTimeline, removed, data) {
    if (!toStartOfTimeline && data.liveEvent) {
    var messageToAppend = room.timeline.[room.timeline.length - 1];
    }
    });
  • Room.timelineReset: (
        room: Room | undefined,
        timelineSet: EventTimelineSet,
        resetAllTimelines: boolean,
    ) => 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.