Default to public join rule in remote summary (#18493)

See: https://github.com/element-hq/synapse/issues/18358#issuecomment-2866119550
This commit is contained in:
nexy7574
2025-06-09 11:59:49 +01:00
committed by GitHub
parent 6521406a37
commit 341d956ee6
2 changed files with 2 additions and 1 deletions

1
changelog.d/18493.bugfix Normal file
View File

@@ -0,0 +1 @@
Fixed room summary API incorrectly returning that a room is private in the room summary response when the join rule is omitted by the remote server. Contributed by @nexy7574.

View File

@@ -701,7 +701,7 @@ class RoomSummaryHandler:
# The API doesn't return the room version so assume that a
# join rule of knock is valid.
if (
room.get("join_rule")
room.get("join_rule", JoinRules.PUBLIC)
in (JoinRules.PUBLIC, JoinRules.KNOCK, JoinRules.KNOCK_RESTRICTED)
or room.get("world_readable") is True
):