From 0fb307d09b23a7310fbdb44d60a87b03c816f3f5 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Tue, 3 Nov 2015 10:15:30 +0000 Subject: [PATCH] Use the history length specified in startClient() for room initial syncs. --- lib/client.js | 3 ++- lib/models/room.js | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/client.js b/lib/client.js index c3c4a93b8..a0e513a73 100644 --- a/lib/client.js +++ b/lib/client.js @@ -2176,7 +2176,8 @@ function _syncRoom(client, room) { } var defer = q.defer(); client._syncingRooms[room.roomId] = defer.promise; - client.roomInitialSync(room.roomId, 8).done(function(res) { + client.roomInitialSync(room.roomId, client._config.initialSyncLimit).done( + function(res) { room.timeline = []; // blow away any previous messages. _processRoomEvents(client, room, res.state, res.messages); room.recalculate(client.credentials.userId); diff --git a/lib/models/room.js b/lib/models/room.js index 15cdf602e..61bbc7ffa 100644 --- a/lib/models/room.js +++ b/lib/models/room.js @@ -326,7 +326,6 @@ Room.prototype.getUsersReadUpTo = function(event) { * have received no read receipts from them. * @param {String} userId The user ID to get read receipt event ID for * @return {String} ID of the latest event that the given user has read, or null. - * an empty list. */ Room.prototype.getEventReadUpTo = function(userId) { if (