From b14be026b794978edab049e826ae8588bc3e9939 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 6 Aug 2018 18:56:29 +0200 Subject: [PATCH] pass LL flag to room, to know if we should wait for lazy members at all --- src/models/room.js | 3 ++- src/sync.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/models/room.js b/src/models/room.js index 0e056e7c8..da506870b 100644 --- a/src/models/room.js +++ b/src/models/room.js @@ -278,7 +278,8 @@ Room.prototype.setSyncedMembership = function(membership) { * @return {bool} whether or not the members of this room need to be loaded */ Room.prototype.needsOutOfBandMembers = function() { - return this.currentState.needsOutOfBandMembers(); + return this._opts.lazyLoadMembers && + this.currentState.needsOutOfBandMembers(); }; /** diff --git a/src/sync.js b/src/sync.js index 2c617b8a5..fd893293e 100644 --- a/src/sync.js +++ b/src/sync.js @@ -114,6 +114,7 @@ function SyncApi(client, opts) { SyncApi.prototype.createRoom = function(roomId) { const client = this.client; const room = new Room(roomId, client.getUserId(), { + lazyLoadMembers: this.opts.lazyLoadMembers, pendingEventOrdering: this.opts.pendingEventOrdering, timelineSupport: client.timelineSupport, });