From 80f6f98ac42ae656661868872303735cbf7a053a Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Tue, 27 Feb 2024 19:29:53 +0200 Subject: [PATCH] Remove welcome_user_id from Element and Schildichat Ref: - https://github.com/matrix-org/matrix-react-sdk/pull/12153 - https://github.com/element-hq/element-web/pull/26885 Technically, it may still work for Schildichat, because it's stuck in the past. It will catch up soon anyway. --- group_vars/matrix_servers | 4 ---- roles/custom/matrix-client-element/defaults/main.yml | 1 - .../matrix-client-element/tasks/validate_config.yml | 1 + .../matrix-client-element/templates/config.json.j2 | 1 - roles/custom/matrix-client-schildichat/defaults/main.yml | 1 - .../matrix-client-schildichat/tasks/validate_config.yml | 9 +++++++++ .../matrix-client-schildichat/templates/config.json.j2 | 1 - 7 files changed, 10 insertions(+), 8 deletions(-) diff --git a/group_vars/matrix_servers b/group_vars/matrix_servers index a3ec55f06..280b3e8fa 100755 --- a/group_vars/matrix_servers +++ b/group_vars/matrix_servers @@ -3901,8 +3901,6 @@ matrix_client_element_enable_presence_by_hs_url: | else {matrix_client_element_default_hs_url: false} }} -matrix_client_element_welcome_user_id: ~ - matrix_client_element_jitsi_preferred_domain: "{{ matrix_server_fqn_jitsi if jitsi_enabled else '' }}" ###################################################################### @@ -4014,8 +4012,6 @@ matrix_client_schildichat_enable_presence_by_hs_url: | else {matrix_client_schildichat_default_hs_url: false} }} -matrix_client_schildichat_welcome_user_id: ~ - matrix_client_schildichat_jitsi_preferred_domain: "{{ matrix_server_fqn_jitsi if jitsi_enabled else '' }}" ###################################################################### diff --git a/roles/custom/matrix-client-element/defaults/main.yml b/roles/custom/matrix-client-element/defaults/main.yml index 4905dc977..7f6802280 100644 --- a/roles/custom/matrix-client-element/defaults/main.yml +++ b/roles/custom/matrix-client-element/defaults/main.yml @@ -151,7 +151,6 @@ matrix_client_element_bug_report_endpoint_url: "https://element.io/bugreports/su matrix_client_element_show_lab_settings: true # noqa var-naming # Element public room directory server(s) matrix_client_element_room_directory_servers: ['matrix.org'] -matrix_client_element_welcome_user_id: ~ # Branding of Element matrix_client_element_brand: "Element" diff --git a/roles/custom/matrix-client-element/tasks/validate_config.yml b/roles/custom/matrix-client-element/tasks/validate_config.yml index e9d9b4105..bf90b3d03 100644 --- a/roles/custom/matrix-client-element/tasks/validate_config.yml +++ b/roles/custom/matrix-client-element/tasks/validate_config.yml @@ -43,6 +43,7 @@ - {'old': 'matrix_client_element_branding_authHeaderLogoUrl', 'new': 'matrix_client_element_branding_auth_header_logo_url'} - {'old': 'matrix_client_element_branding_welcomeBackgroundUrl', 'new': 'matrix_client_element_branding_welcome_background_url'} - {'old': 'matrix_client_element_jitsi_preferredDomain', 'new': 'matrix_client_element_jitsi_preferred_domain'} + - {'old': 'matrix_client_element_welcome_user_id', 'new': ''} - when: matrix_client_element_container_labels_traefik_enabled | bool block: diff --git a/roles/custom/matrix-client-element/templates/config.json.j2 b/roles/custom/matrix-client-element/templates/config.json.j2 index 180a8f818..dfb03fb10 100644 --- a/roles/custom/matrix-client-element/templates/config.json.j2 +++ b/roles/custom/matrix-client-element/templates/config.json.j2 @@ -26,7 +26,6 @@ "room_directory": { "servers": {{ matrix_client_element_room_directory_servers | to_json }} }, - "welcome_user_id": {{ matrix_client_element_welcome_user_id | to_json }}, {% if matrix_client_element_enable_presence_by_hs_url is not none %} "enable_presence_by_hs_url": {{ matrix_client_element_enable_presence_by_hs_url | to_json }}, {% endif %} diff --git a/roles/custom/matrix-client-schildichat/defaults/main.yml b/roles/custom/matrix-client-schildichat/defaults/main.yml index e777e6d48..93e58bf7e 100644 --- a/roles/custom/matrix-client-schildichat/defaults/main.yml +++ b/roles/custom/matrix-client-schildichat/defaults/main.yml @@ -145,7 +145,6 @@ matrix_client_schildichat_bug_report_endpoint_url: "https://element.io/bugreport matrix_client_schildichat_show_lab_settings: true # noqa var-naming # schildichat public room directory server(s) matrix_client_schildichat_room_directory_servers: ['matrix.org'] -matrix_client_schildichat_welcome_user_id: ~ # Branding of schildichat matrix_client_schildichat_brand: "schildichat" diff --git a/roles/custom/matrix-client-schildichat/tasks/validate_config.yml b/roles/custom/matrix-client-schildichat/tasks/validate_config.yml index 966a74931..b5b5db54d 100644 --- a/roles/custom/matrix-client-schildichat/tasks/validate_config.yml +++ b/roles/custom/matrix-client-schildichat/tasks/validate_config.yml @@ -1,5 +1,14 @@ --- +- name: (Deprecation) Catch and report renamed Schildichat settings + ansible.builtin.fail: + msg: >- + Your configuration contains a variable, which now has a different name. + Please change your configuration to rename the variable (`{{ item.old }}` -> `{{ item.new }}`). + when: "item.old in vars" + with_items: + - {'old': 'matrix_client_schildichat_welcome_user_id', 'new': ''} + - name: Fail if required schildichat settings not defined ansible.builtin.fail: msg: > diff --git a/roles/custom/matrix-client-schildichat/templates/config.json.j2 b/roles/custom/matrix-client-schildichat/templates/config.json.j2 index fcf60f5d5..bd5ab79d2 100644 --- a/roles/custom/matrix-client-schildichat/templates/config.json.j2 +++ b/roles/custom/matrix-client-schildichat/templates/config.json.j2 @@ -26,7 +26,6 @@ "room_directory": { "servers": {{ matrix_client_schildichat_room_directory_servers | to_json }} }, - "welcome_user_id": {{ matrix_client_schildichat_welcome_user_id | to_json }}, {% if matrix_client_schildichat_enable_presence_by_hs_url is not none %} "enable_presence_by_hs_url": {{ matrix_client_schildichat_enable_presence_by_hs_url | to_json }}, {% endif %}