From 40834d188e86fd795aaf687abefd8adc8ee30300 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 2 Aug 2016 18:58:18 +0100 Subject: [PATCH] Don't let pendingEventOrdering be changed --- src/Lifecycle.js | 5 +++++ src/MatrixClientPeg.js | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Lifecycle.js b/src/Lifecycle.js index 157af4aa4c..be09551c88 100644 --- a/src/Lifecycle.js +++ b/src/Lifecycle.js @@ -79,6 +79,11 @@ function startMatrixClient() { Notifier.start(); UserActivity.start(); Presence.start(); + + // the react sdk doesn't work without this, so don't allow + // it to be overridden (and modify the global object so at + // at least the app can see we've changed it) + MatrixClientPeg.opts.pendingEventOrdering = "detached"; MatrixClientPeg.get().startClient(MatrixClientPeg.opts); } diff --git a/src/MatrixClientPeg.js b/src/MatrixClientPeg.js index 96eb95de64..49326cc22f 100644 --- a/src/MatrixClientPeg.js +++ b/src/MatrixClientPeg.js @@ -45,7 +45,6 @@ class MatrixClientPeg { // starts the client. These can be altered when the // 'will_start_client' event is dispatched. this.opts = { - pendingEventOrdering: "detached", initialSyncLimit: 20, }; }