summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2016-09-21 13:51:52 +0100
committerGitHub <noreply@github.com>2016-09-21 13:51:52 +0100
commit85827eef2d32604c91f2b4f158a286dc8075bc8c (patch)
tree32f0fed360db7d4e1bd67e338dfc85722c2cc2af /synapse
parentMerge pull request #1131 from matrix-org/matthew/e2e-notifs (diff)
parentAdd total_room_count_estimate to /publicRooms (diff)
downloadsynapse-85827eef2d32604c91f2b4f158a286dc8075bc8c.tar.xz
Merge pull request #1133 from matrix-org/erikj/public_room_count
Add total_room_count_estimate to /publicRooms
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/room_list.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/handlers/room_list.py b/synapse/handlers/room_list.py
index 5a533682c5..b04aea0110 100644
--- a/synapse/handlers/room_list.py
+++ b/synapse/handlers/room_list.py
@@ -125,6 +125,8 @@ class RoomListHandler(BaseHandler):
             if r not in newly_unpublished and rooms_to_num_joined[room_id] > 0
         ]
 
+        total_room_count = len(rooms_to_scan)
+
         if since_token:
             # Filter out rooms we've already returned previously
             # `since_token.current_limit` is the index of the last room we
@@ -188,6 +190,7 @@ class RoomListHandler(BaseHandler):
 
         results = {
             "chunk": chunk,
+            "total_room_count_estimate": total_room_count,
         }
 
         if since_token: