1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-08-19 16:42:09 +03:00

Use the history length specified in startClient() for room initial syncs.

This commit is contained in:
Kegan Dougal
2015-11-03 10:15:30 +00:00
parent c1160d3419
commit 0fb307d09b
2 changed files with 2 additions and 2 deletions

View File

@@ -2176,7 +2176,8 @@ function _syncRoom(client, room) {
} }
var defer = q.defer(); var defer = q.defer();
client._syncingRooms[room.roomId] = defer.promise; 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. room.timeline = []; // blow away any previous messages.
_processRoomEvents(client, room, res.state, res.messages); _processRoomEvents(client, room, res.state, res.messages);
room.recalculate(client.credentials.userId); room.recalculate(client.credentials.userId);

View File

@@ -326,7 +326,6 @@ Room.prototype.getUsersReadUpTo = function(event) {
* have received no read receipts from them. * have received no read receipts from them.
* @param {String} userId The user ID to get read receipt event ID for * @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. * @return {String} ID of the latest event that the given user has read, or null.
* an empty list.
*/ */
Room.prototype.getEventReadUpTo = function(userId) { Room.prototype.getEventReadUpTo = function(userId) {
if ( if (