summary refs log tree commit diff
path: root/synapse/handlers/room.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2014-08-27 11:19:37 +0100
committerMark Haines <mark.haines@matrix.org>2014-08-27 11:19:37 +0100
commitbf05218c4b1740cdc5477cadbc36f0575e2dcd51 (patch)
treeced8ed09e18afb11e97734959150b8ef7f0db833 /synapse/handlers/room.py
parentFold federation/handler into handlers/federation (diff)
parentAdded support for GET /events/$eventid with auth checks. (diff)
downloadsynapse-bf05218c4b1740cdc5477cadbc36f0575e2dcd51.tar.xz
Merge branch 'develop' into storage_transactions
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 6abfa00c5c..9b02ce0dfd 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -249,6 +249,10 @@ class MessageHandler(BaseRoomHandler):
         # 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,
@@ -265,7 +269,7 @@ class MessageHandler(BaseRoomHandler):
             try:
                 messages, token = yield self.store.get_recent_events_for_room(
                     event.room_id,
-                    limit=10,
+                    limit=limit,
                     end_token=now_rooms_token,
                 )