Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Add total_room_count_estimate to /publicRooms #1133

Merged
merged 1 commit into from
Sep 21, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions synapse/handlers/room_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ def get_order_for_room(room_id):
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
Expand Down Expand Up @@ -188,6 +190,7 @@ def get_order_for_room(room_id):

results = {
"chunk": chunk,
"total_room_count_estimate": total_room_count,
}

if since_token:
Expand Down