summary refs log tree commit diff
path: root/synapse/handlers/room.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-08-26 16:29:44 +0100
committerErik Johnston <erik@matrix.org>2014-08-26 16:29:44 +0100
commit8885c8546c3493ada2f00b1626d45fa90109ab5f (patch)
tree7dbe04a84413a4511bcc3ef62d227659052cefa7 /synapse/handlers/room.py
parentMerge branch 'develop' of github.com:matrix-org/synapse into stream_refactor (diff)
parentRespect 'limit' param in initialSync api (diff)
downloadsynapse-8885c8546c3493ada2f00b1626d45fa90109ab5f.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into stream_refactor
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r--synapse/handlers/room.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index c2b10f4189..5a4569ac95 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -270,6 +270,10 @@ class MessageHandler(BaseHandler):
         # FIXME (erikj): We need to not generate this token,
         now_token = "%s_%s" % (now_rooms_token, now_presence_token)
 
+        limit = pagin_config.limit
+        if not limit:
+            limit = 10
+
         for event in room_list:
             d = {
                 "room_id": event.room_id,
@@ -286,7 +290,7 @@ class MessageHandler(BaseHandler):
             try:
                 messages, token = yield self.store.get_recent_events_for_room(
                     event.room_id,
-                    limit=10,
+                    limit=limit,
                     end_token=now_rooms_token,
                 )