Type alias EventTimelineSetHandlerMap

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

Type declaration

  • Room.timeline: ((event: MatrixEvent, room: Room | undefined, toStartOfTimeline: boolean | undefined, removed: boolean, data: IRoomTimelineData) => void)
      • (event: MatrixEvent, room: Room | undefined, toStartOfTimeline: boolean | undefined, removed: boolean, data: IRoomTimelineData): 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];
        }
        });

        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: Room | undefined, eventTimelineSet: EventTimelineSet, resetAllTimelines: boolean) => void)
      • (room: Room | undefined, eventTimelineSet: 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.

        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