Class: StubStore

store/stub~StubStore

new StubStore()

Construct a stub store. This does no-ops on most store methods.
Source:

Methods

getAccountData(eventType)

Get account data event by event type
Parameters:
Name Type Description
eventType string The event type being queried
Source:

getFilter(userId, filterId) → (nullable) {Filter}

Retrieve a filter.
Parameters:
Name Type Description
userId string
filterId string
Source:
Returns:
A filter or null.
Type
Filter

getFilterIdByName(filterName) → (nullable) {string}

Retrieve a filter ID with the given name.
Parameters:
Name Type Description
filterName string The filter name.
Source:
Returns:
The filter ID or null.
Type
string

getRoom(roomId) → {null}

No-op.
Parameters:
Name Type Description
roomId string
Source:
Returns:
Type
null

getRooms() → {Array}

No-op.
Source:
Returns:
An empty array.
Type
Array

getRoomSummaries() → {Array}

No-op.
Source:
Returns:
An empty array.
Type
Array

getSyncToken() → {string}

Get the sync token.
Source:
Returns:
Type
string

getUser(userId) → {null}

No-op.
Parameters:
Name Type Description
userId string
Source:
Returns:
Type
null

getUsers() → {Array.<User>}

No-op.
Source:
Returns:
Type
Array.<User>

removeRoom(roomId)

Permanently delete a room.
Parameters:
Name Type Description
roomId string
Source:

scrollback(room, limit) → {Array}

No-op.
Parameters:
Name Type Description
room Room
limit integer
Source:
Returns:
Type
Array

setFilterIdByName(filterName, filterId)

Set a filter name to ID mapping.
Parameters:
Name Type Description
filterName string
filterId string
Source:

setSyncToken(token)

Set the sync token.
Parameters:
Name Type Description
token string
Source:

storeAccountDataEvents(events)

Store user-scoped account data events
Parameters:
Name Type Description
events Array.<MatrixEvent> The events to store.
Source:

storeEvents(room, events, token, toStart)

Store events for a room.
Parameters:
Name Type Description
room Room The room to store events for.
events Array.<MatrixEvent> The events to store.
token string The token associated with these events.
toStart boolean True if these are paginated results.
Source:

storeFilter(filter)

Store a filter.
Parameters:
Name Type Description
filter Filter
Source:

storeRoom(room)

No-op.
Parameters:
Name Type Description
room Room
Source:

storeUser(user)

No-op.
Parameters:
Name Type Description
user User
Source: