From a11e1cc2f9e37e1261eade4d9c3c141dc7ae43fb Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Wed, 27 Jun 2018 17:39:20 +0100 Subject: [PATCH] [WIP] Send lazy_load_memberers filter when syncing --- src/MatrixClientPeg.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/MatrixClientPeg.js b/src/MatrixClientPeg.js index 9d86a62de4..01a411663c 100644 --- a/src/MatrixClientPeg.js +++ b/src/MatrixClientPeg.js @@ -34,6 +34,14 @@ interface MatrixClientCreds { guest: boolean, } +const FILTER_CONTENT = { + room: { + state: { + lazy_load_members: true, + }, + }, +}; + /** * Wrapper object for handling the js-sdk Matrix Client object in the react-sdk * Handles the creation/initialisation of client objects. @@ -99,6 +107,8 @@ class MatrixClientPeg { // the react sdk doesn't work without this, so don't allow opts.pendingEventOrdering = "detached"; + opts.filter = await this.matrixClient.createFilter(FILTER_CONTENT); + try { const promise = this.matrixClient.store.startup(); console.log(`MatrixClientPeg: waiting for MatrixClient store to initialise`);