diff --git a/src/Lifecycle.js b/src/Lifecycle.js index 3bf52b6cf2..f6aead4786 100644 --- a/src/Lifecycle.js +++ b/src/Lifecycle.js @@ -77,9 +77,7 @@ function startMatrixClient() { UserActivity.start(); Presence.start(); - let opts = utils.deepCopy(MatrixClientPeg.opts); - opts.pendingEventOrdering = "detached"; - MatrixClientPeg.get().startClient(opts); + MatrixClientPeg.start(); } function _onLoggedOut() { diff --git a/src/MatrixClientPeg.js b/src/MatrixClientPeg.js index c8b015f99f..0d5af6ccf4 100644 --- a/src/MatrixClientPeg.js +++ b/src/MatrixClientPeg.js @@ -88,6 +88,12 @@ class MatrixClientPeg { ); } + start() { + const opts = utils.deepCopy(MatrixClientPeg.opts); + opts.pendingEventOrdering = "detached"; + this.get().startClient(opts); + }, + _replaceClient(hs_url, is_url, user_id, access_token, isGuest) { if (localStorage) { try {