diff options
author | Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> | 2021-06-09 20:31:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-09 20:31:31 +0100 |
commit | a7a37437bc0364d6cde93f3ec264e06ed6324068 (patch) | |
tree | 6e29b4aa2985addee54f6568660bba0b20124cd5 /synapse/handlers/room_list.py | |
parent | Implement knock feature (#6739) (diff) | |
download | synapse-a7a37437bc0364d6cde93f3ec264e06ed6324068.tar.xz |
Integrate knock rooms with the public rooms directory (#9359)
This PR implements the ["Changes regarding the Public Rooms Directory"](https://github.com/Sorunome/matrix-doc/blob/soru/knock/proposals/2403-knock.md#changes-regarding-the-public-rooms-directory) section of knocking MSC2403. Specifically, it: * Allows rooms with `join_rule` "knock" to be returned by the query behind the public rooms directory * Adds the field `join_rule` to each room entry returned by a public rooms directory query, so clients can know whether to attempt a join or knock on a room Based on https://github.com/matrix-org/synapse/issues/6739. Complement tests for this change: https://github.com/matrix-org/complement/pull/72
Diffstat (limited to 'synapse/handlers/room_list.py')
-rw-r--r-- | synapse/handlers/room_list.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/synapse/handlers/room_list.py b/synapse/handlers/room_list.py index 0a26088d32..5e3ef7ce3a 100644 --- a/synapse/handlers/room_list.py +++ b/synapse/handlers/room_list.py @@ -169,6 +169,7 @@ class RoomListHandler(BaseHandler): "world_readable": room["history_visibility"] == HistoryVisibility.WORLD_READABLE, "guest_can_join": room["guest_access"] == "can_join", + "join_rule": room["join_rules"], } # Filter out Nones – rather omit the field altogether |