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, });