Construct a new in-memory data store for the Matrix Client.
Config options
Stop the store and perform any appropriate cleanup
Get account data event by event type
The event type being queried
the user account_data event of given type, if any
Retrieve a filter ID with the given name.
The filter name.
The filter ID or null.
Fetches the oldest batch of to-device messages in the queue
Returns the out-of-band membership events for this room that were previously loaded.
the events, potentially an empty array if OOB loading didn't yield any new members
Retrieve a room by its' room ID.
The room ID.
The room or null.
Promise which resolves with a sync response to restore the client state to where it was at the last save, or null if there is no saved sync data.
If there is a saved sync, the nextBatch token for this sync, otherwise null.
Retrieve the token to stream from.
The token or null.
Retrieve a User by its' user ID.
The user ID.
The user or null.
whether or not the database was newly created in this session.
Permanently delete a room.
Removes a specific batch of to-device messages from the queue
Save does nothing as there is no backing data store.
True to force a save (but the memory store still can't save anything)
Stores batches of outgoing to-device messages
Retrieve scrollback for this room.
The matrix room
The max number of old events to retrieve.
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.
Optional
filterId: stringStores 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
the membership events to store
when all members have been stored
setSyncData does nothing as there is no backing data store.
The sync data
An immediately resolved promise.
Set the token to stream from.
The token to stream from.
Set the user creator which is used for creating User objects
A callback that accepts an user-id and returns an User object
Startup does nothing as this store doesn't require starting up.
An immediately resolved promise.
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.
The events to store.
Store events for a room. The events have already been added to the timeline
The room to store events for.
The events to store.
The token associated with these events.
True if these are paginated results.
Store the given room.
The room to be stored. All properties must be stored.
We never want to save becase we have nothing to save to.
If the store wants to save
A store for most of the data js-sdk needs to store, apart from crypto data