diff --git a/roles/custom/matrix-synapse/defaults/main.yml b/roles/custom/matrix-synapse/defaults/main.yml index 1db3c85dd..c934e0f03 100644 --- a/roles/custom/matrix-synapse/defaults/main.yml +++ b/roles/custom/matrix-synapse/defaults/main.yml @@ -1544,6 +1544,17 @@ matrix_s3_media_store_path: "{{ matrix_synapse_media_store_path }}" # Controls whether the self-check feature should validate SSL certificates. matrix_synapse_self_check_validate_certificates: true +# Controls whether server notices are enabled. +matrix_synapse_server_notices_enabled: false +# The localpart of the user that will send server notices, this user will be created if it doesn't exist. +matrix_synapse_server_notices_system_mxid_localpart: "notices" +# The display name of the user that will send server notices. +matrix_synapse_server_notices_system_mxid_display_name: "Server Notices" +# Optional avatar URL for the user that will send server notices, example: mxc://example.com/abc123 +matrix_synapse_server_notices_system_mxid_avatar_url: ~ +# The name of the room where server notices will be sent, this room will be created if it doesn't exist. +matrix_synapse_server_notices_room_name: "Server Notices" + # Controls whether searching the public room list is enabled. matrix_synapse_enable_room_list_search: true diff --git a/roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2 b/roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2 index 50a52d3bb..9509ce64b 100644 --- a/roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2 +++ b/roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2 @@ -2731,6 +2731,15 @@ stats: # system_mxid_display_name: "Server Notices" # system_mxid_avatar_url: "mxc://example.com/oumMVlgDnLYFaPVkExemNVVZ" # room_name: "Server Notices" +{% if matrix_synapse_server_notices_enabled %} +server_notices: + system_mxid_localpart: {{ matrix_synapse_server_notices_system_mxid_localpart | string | to_json }} + system_mxid_display_name: {{ matrix_synapse_server_notices_system_mxid_display_name | string | to_json }} +{% if matrix_synapse_server_notices_system_mxid_avatar_url %} + system_mxid_avatar_url: {{ matrix_synapse_server_notices_system_mxid_avatar_url | string | to_json }} +{% endif %} + room_name: {{ matrix_synapse_server_notices_room_name | string | to_json }} +{% endif %}