diff --git a/changelogs/client_server/newsfragments/2102.clarification b/changelogs/client_server/newsfragments/2102.clarification new file mode 100644 index 00000000..df9eab58 --- /dev/null +++ b/changelogs/client_server/newsfragments/2102.clarification @@ -0,0 +1 @@ +"Public" rooms in user directory queries are defined through their join rule and history visibility. diff --git a/data/api/client-server/users.yaml b/data/api/client-server/users.yaml index 3a7f2bfa..c1f3c6c8 100644 --- a/data/api/client-server/users.yaml +++ b/data/api/client-server/users.yaml @@ -20,10 +20,17 @@ paths: post: summary: Searches the user directory. description: |- - Performs a search for users. The homeserver may - determine which subset of users are searched, however the homeserver - MUST at a minimum consider the users the requesting user shares a - room with and those who reside in public rooms (known to the homeserver). + Performs a search for users. The homeserver may determine which + subset of users are searched. However, the homeserver MUST at a + minimum consider users who are visible to the requester based + on their membership in rooms known to the homeserver. This means: + + - users that share a room with the requesting user + - users who are joined to rooms known to the homeserver that have a + `public` [join rule](#mroomjoin_rules) + - users who are joined to rooms known to the homeserver that have a + `world_readable` [history visibility](#room-history-visibility) + The search MUST consider local users to the homeserver, and SHOULD query remote users as part of the search.