You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-28 05:03:59 +03:00
Poll /sync with a short timeout while catching up
On first connect, or after a disconnection, poll /sync with timeout=0 until we get no to_device messages back. This will allow us to figure out whether we have more to_device messages queued up for us on the server, which in turn will help us fix a bug with clearing out one-time-keys too quickly.
This commit is contained in:
@@ -3132,6 +3132,9 @@ module.exports.CRYPTO_ENABLED = CRYPTO_ENABLED;
|
||||
* will become the 'since' token for the next call to /sync. Only present if
|
||||
* <code>state=PREPARED</code> or <code>state=SYNCING</code>.
|
||||
*
|
||||
* @param {boolean} data.catchingUp True if we are working our way through a
|
||||
* backlog of events after connecting. Only present if <code>state=SYNCING</code>.
|
||||
*
|
||||
* @example
|
||||
* matrixClient.on("sync", function(state, prevState, data) {
|
||||
* switch (state) {
|
||||
|
||||
Reference in New Issue
Block a user