summary refs log tree commit diff
path: root/synapse/rest/client
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-10-09 16:52:21 +0100
committerErik Johnston <erik@matrix.org>2019-10-09 16:52:21 +0100
commit5c1f886c75979b606c1e8bb45fcd8b7d26a71f39 (patch)
treeee651459cda811d4ac5d11f1e2fc4d9c06df037a /synapse/rest/client
parentUpdate (diff)
parentMerge pull request #6185 from matrix-org/erikj/fix_censored_evnets (diff)
downloadsynapse-5c1f886c75979b606c1e8bb45fcd8b7d26a71f39.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/patch_inner
Diffstat (limited to 'synapse/rest/client')
-rw-r--r--synapse/rest/client/v1/room.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/synapse/rest/client/v1/room.py b/synapse/rest/client/v1/room.py
index 6bf924dedc..9c1d41421c 100644
--- a/synapse/rest/client/v1/room.py
+++ b/synapse/rest/client/v1/room.py
@@ -361,6 +361,10 @@ class PublicRoomListRestServlet(TransactionRestServlet):
         limit = parse_integer(request, "limit", 0)
         since_token = parse_string(request, "since", None)
 
+        if limit == 0:
+            # zero is a special value which corresponds to no limit.
+            limit = None
+
         handler = self.hs.get_room_list_handler()
         if server:
             data = yield handler.get_remote_public_room_list(
@@ -398,6 +402,10 @@ class PublicRoomListRestServlet(TransactionRestServlet):
         else:
             network_tuple = ThirdPartyInstanceID.from_string(third_party_instance_id)
 
+        if limit == 0:
+            # zero is a special value which corresponds to no limit.
+            limit = None
+
         handler = self.hs.get_room_list_handler()
         if server:
             data = yield handler.get_remote_public_room_list(