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

Hierarchy (View Summary)

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.

  • Set a filter name to ID mapping.

    Parameters

    • filterName: string
    • OptionalfilterId: string

    Returns void

  • 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 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