Constructors

Methods

  • Returns the additional data object associated with the current sync state, or null if there is no such data. Sync errors, if available, are put in the 'error' key of this object.

    Returns null | SyncStateData

  • Injects events into a room's model.

    Parameters

    • room: Room
    • stateEventList: MatrixEvent[]

      A list of state events. This is the state at the START of the timeline list if it is supplied.

    • stateAfterEventList: undefined

      A list of state events. This is the state at the END of the timeline list if it is supplied.

    • OptionaltimelineEventList: MatrixEvent[]

      A list of timeline events, including threaded. Lower index is earlier in time. Higher index is later.

    • OptionalfromCache: boolean

      whether the sync response came from cache

      No more than one of stateEventList and stateAfterEventList must be supplied. If stateEventList is supplied, the events in timelineEventList are added to the state after stateEventList. If stateAfterEventList is supplied, the events in timelineEventList are not added to the state.

    Returns Promise<void>

  • Parameters

    • room: Room
    • stateEventList: undefined
    • stateAfterEventList: MatrixEvent[]
    • OptionaltimelineEventList: MatrixEvent[]
    • OptionalfromCache: boolean

    Returns Promise<void>

  • Peek into a room. This will result in the room in question being synced so it is accessible via getRooms(). Live updates for the room will be provided.

    Parameters

    • roomId: string

      The room ID to peek into.

    • limit: number = 20

      The number of timeline events to initially retrieve.

    Returns Promise<Room>

    A promise which resolves once the room has been added to the store.

  • Retry a backed off syncing request immediately. This should only be used when the user explicitly attempts to retry their lost connection.

    Returns boolean

    True if this resulted in a request being retried.

  • Specify the set_presence value to be used for subsequent calls to the Sync API.

    Parameters

    • Optionalpresence: SetPresence

      the presence to specify to set_presence of sync calls

    Returns void

  • Stops the sync object from syncing.

    Returns void

  • Stop polling for updates in the peeked room. NOPs if there is no room being peeked.

    Returns void