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

Commit 97eab85

Browse files
author
Sean Quah
committed
Update get_current_hosts_in_room docstring to mention partial state
Signed-off-by: Sean Quah <[email protected]>
1 parent a0e4584 commit 97eab85

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

synapse/storage/databases/main/roommember.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,6 +1029,14 @@ async def get_current_hosts_in_room(self, room_id: str) -> List[str]:
10291029
longest is good because they're most likely to have anything we ask
10301030
about.
10311031
1032+
Uses `m.room.member`s in the room state at the current forward extremities to
1033+
determine which hosts are in the room.
1034+
1035+
Will return inaccurate results for rooms with partial state, since the state for
1036+
the forward extremities of those rooms will exclude most members. We may also
1037+
calculate room state incorrectly for such rooms and believe that a host is or
1038+
is not in the room when the opposite is true.
1039+
10321040
Returns:
10331041
Returns a list of servers sorted by longest in the room first. (aka.
10341042
sorted by join with the lowest depth first).

0 commit comments

Comments
 (0)