diff --git a/CHANGELOG.md b/CHANGELOG.md index 676dbcb26..aacf9a8b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ BREAKING CHANGE --------------- * `MatrixClient::startClient` now returns a Promise. No method should be called on the client before that promise resolves. Before this method didn't return anything. + * A new `CATCHUP` sync state, emitted by `MatrixClient#"sync"` and returned by `MatrixClient::getSyncState()`, when doing initial sync after the `ERROR` state. See `MatrixClient` documentation for details. Changes in [0.11.0](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v0.11.0) (TDB) ================================================================================================== diff --git a/spec/unit/matrix-client.spec.js b/spec/unit/matrix-client.spec.js index 8ef22f6b0..2fc5d2cf0 100644 --- a/spec/unit/matrix-client.spec.js +++ b/spec/unit/matrix-client.spec.js @@ -380,7 +380,7 @@ describe("MatrixClient", function() { client.startClient(); }); - it("should transition ERROR -> PREPARED after /sync if prev failed", + it("should transition ERROR -> CATCHUP after /sync if prev failed", function(done) { const expectedStates = []; acceptKeepalives = false; @@ -403,7 +403,7 @@ describe("MatrixClient", function() { expectedStates.push(["RECONNECTING", null]); expectedStates.push(["ERROR", "RECONNECTING"]); - expectedStates.push(["PREPARED", "ERROR"]); + expectedStates.push(["CATCHUP", "ERROR"]); client.on("sync", syncChecker(expectedStates, done)); client.startClient(); }); diff --git a/src/client.js b/src/client.js index 7abb00d61..03207690e 100644 --- a/src/client.js +++ b/src/client.js @@ -3527,6 +3527,12 @@ module.exports.CRYPTO_ENABLED = CRYPTO_ENABLED; * a state of SYNCING. This is the equivalent of "syncComplete" in the * previous API. * + *