From a7c6a923f07ac95764b8549740aecb0798b7b199 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Thu, 5 Nov 2015 14:37:05 +0000 Subject: [PATCH] Unbreak everything (JS SDK had breaking API change) --- src/controllers/pages/MatrixChat.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/controllers/pages/MatrixChat.js b/src/controllers/pages/MatrixChat.js index a38ba8e4e7..57344b5a69 100644 --- a/src/controllers/pages/MatrixChat.js +++ b/src/controllers/pages/MatrixChat.js @@ -295,7 +295,8 @@ module.exports = { var Notifier = sdk.getComponent('organisms.Notifier'); var cli = MatrixClientPeg.get(); var self = this; - cli.on('syncComplete', function() { + cli.on('sync', function(state) { + if (self.sdkReady || state !== "PREPARED") { return; } self.sdkReady = true; if (self.starting_room_alias) {