summary refs log tree commit diff
path: root/synapse/rest/client/v1/room.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-10-02 14:08:35 +0100
committerGitHub <noreply@github.com>2019-10-02 14:08:35 +0100
commita5166e4d5febc0e03ba9da9db99127a797a0bc4d (patch)
treeaea253a817e70889e4de547916b442a11abe8c9e /synapse/rest/client/v1/room.py
parentFix up some typechecking (#6150) (diff)
downloadsynapse-a5166e4d5febc0e03ba9da9db99127a797a0bc4d.tar.xz
Land improved room list based on room stats (#6019)
Use room_stats and room_state for room directory search
Diffstat (limited to 'synapse/rest/client/v1/room.py')
-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(