mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
Merge pull request #1133 from matrix-org/erikj/public_room_count
Add total_room_count_estimate to /publicRooms
This commit is contained in:
commit
85827eef2d
@ -125,6 +125,8 @@ class RoomListHandler(BaseHandler):
|
|||||||
if r not in newly_unpublished and rooms_to_num_joined[room_id] > 0
|
if r not in newly_unpublished and rooms_to_num_joined[room_id] > 0
|
||||||
]
|
]
|
||||||
|
|
||||||
|
total_room_count = len(rooms_to_scan)
|
||||||
|
|
||||||
if since_token:
|
if since_token:
|
||||||
# Filter out rooms we've already returned previously
|
# Filter out rooms we've already returned previously
|
||||||
# `since_token.current_limit` is the index of the last room we
|
# `since_token.current_limit` is the index of the last room we
|
||||||
@ -188,6 +190,7 @@ class RoomListHandler(BaseHandler):
|
|||||||
|
|
||||||
results = {
|
results = {
|
||||||
"chunk": chunk,
|
"chunk": chunk,
|
||||||
|
"total_room_count_estimate": total_room_count,
|
||||||
}
|
}
|
||||||
|
|
||||||
if since_token:
|
if since_token:
|
||||||
|
Loading…
Reference in New Issue
Block a user