summary refs log tree commit diff
path: root/synapse/rest/room.py
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2014-12-02 18:00:51 +0000
committerPaul "LeoNerd" Evans <paul@matrix.org>2014-12-02 18:01:16 +0000
commitafb646dc1e7a91ee7a050632d1e5a5883830d18c (patch)
treec839b35b4211ead72da0a593fbfc97ab2e34d807 /synapse/rest/room.py
parentRemove editor junk (diff)
downloadsynapse-afb646dc1e7a91ee7a050632d1e5a5883830d18c.tar.xz
Allow GET /room/:room_id/messages without 'limit' parameter to default to 10
Diffstat (limited to 'synapse/rest/room.py')
-rw-r--r--synapse/rest/room.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/rest/room.py b/synapse/rest/room.py
index cc6ffb9aff..3147d7a60b 100644
--- a/synapse/rest/room.py
+++ b/synapse/rest/room.py
@@ -327,7 +327,9 @@ class RoomMessageListRestServlet(RestServlet):
     @defer.inlineCallbacks
     def on_GET(self, request, room_id):
         user = yield self.auth.get_user_by_req(request)
-        pagination_config = PaginationConfig.from_request(request)
+        pagination_config = PaginationConfig.from_request(request,
+            default_limit=10,
+        )
         with_feedback = "feedback" in request.args
         handler = self.handlers.message_handler
         msgs = yield handler.get_messages(