From 071b5789f2f5ea7f47c2504e44c752adc02a5c41 Mon Sep 17 00:00:00 2001 From: Aine Date: Wed, 10 Sep 2025 16:38:42 +0100 Subject: [PATCH] add matrix_synapse_user_directory_exclude_remote_users var --- roles/custom/matrix-synapse/defaults/main.yml | 1 + .../custom/matrix-synapse/templates/synapse/homeserver.yaml.j2 | 3 +++ 2 files changed, 4 insertions(+) diff --git a/roles/custom/matrix-synapse/defaults/main.yml b/roles/custom/matrix-synapse/defaults/main.yml index fda6832b3..8431caaea 100644 --- a/roles/custom/matrix-synapse/defaults/main.yml +++ b/roles/custom/matrix-synapse/defaults/main.yml @@ -565,6 +565,7 @@ matrix_synapse_include_profile_data_on_invite: true # User search behaviour matrix_synapse_user_directory_search_all_users: false matrix_synapse_user_directory_prefer_local_users: false +matrix_synapse_user_directory_exclude_remote_users: false # Controls whether people with access to the homeserver can register by themselves. matrix_synapse_enable_registration: false diff --git a/roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2 b/roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2 index 938d38f48..0eb99c29c 100644 --- a/roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2 +++ b/roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2 @@ -2646,6 +2646,9 @@ user_directory: # prefer_local_users: {{ matrix_synapse_user_directory_prefer_local_users | to_json }} + # If set to true, the search will only return local users. Defaults to false. + exclude_remote_users: {{ matrix_synapse_user_directory_exclude_remote_users | to_json }} + # User Consent configuration #