Private
accountPrivate
invitePrivate
joinPrivate
knockPrivate
nextPrivate
Readonly
optsPrivate
accumulatePrivate
accumulatePrivate
accumulatePrivate
accumulatePrivate
accumulatePrivate
accumulateAccumulate incremental /sync room data.
the complete /sync JSON
True if the sync response is one saved to the database
Return everything under the 'rooms' key from a /sync response which represents all room data that should be stored. This should be paired with the sync token which represents the most recent /sync response provided to accumulate().
True to generate a sync to be saved to storage
An object with a "nextBatch", "roomsData" and "accountData" keys. The "nextBatch" key is a string which represents at what point in the /sync stream the accumulator reached. This token should be used when restarting a /sync stream at startup. Failure to do so can lead to missing events. The "roomsData" key is an Object which represents the entire /sync response from the 'rooms' key onwards. The "accountData" key is a list of raw events which represent global account data.
Generated using TypeDoc
The purpose of this class is to accumulate /sync responses such that a complete "initial" JSON response can be returned which accurately represents the sum total of the /sync responses accumulated to date. It only handles room data: that is, everything under the "rooms" top-level key.
This class is used when persisting room data so a complete /sync response can be loaded from disk and incremental syncs can be performed on the server, rather than asking the server to do an initial sync on startup.