A store for most of the data js-sdk needs to store, apart from crypto data

Hierarchy (view full)

Implements

Constructors

Properties

accountData: Map<string, MatrixEvent> = ...
createUser?: UserCreator
localStorage?: Storage

Methods

  • Retrieve a filter ID with the given name.

    Parameters

    • filterName: string

      The filter name.

    Returns null | string

    The filter ID or null.

  • Save does nothing as there is no backing data store.

    Parameters

    • force: boolean

      True to force a save (but the memory store still can't save anything)

    Returns Promise<void>

  • Retrieve scrollback for this room.

    Parameters

    • room: Room

      The matrix room

    • limit: number

      The max number of old events to retrieve.

    Returns MatrixEvent[]

    An array of objects which will be at most 'limit' length and at least 0. The objects are the raw event JSON.

  • Stores the out-of-band membership events for this room. Note that it still makes sense to store an empty array as the OOB status for the room is marked as fetched, and getOutOfBandMembers will return an empty array instead of null

    Parameters

    Returns Promise<void>

    when all members have been stored

  • Store user-scoped account data events. N.B. that account data only allows a single event per type, so multiple events with the same type will replace each other.

    Parameters

    Returns void

  • Store events for a room. The events have already been added to the timeline

    Parameters

    • room: Room

      The room to store events for.

    • events: MatrixEvent[]

      The events to store.

    • token: null | string

      The token associated with these events.

    • toStart: boolean

      True if these are paginated results.

    Returns void