From bcbfc1e8385570a3aee2804539feb1938d0b386b Mon Sep 17 00:00:00 2001 From: Edgars Voroboks Date: Sat, 9 Mar 2019 10:30:31 +0200 Subject: [PATCH] Make Matrix Federation required and fix internal federationUrl --- roles/matrix-dimension/tasks/validate_config.yml | 8 ++++++++ roles/matrix-dimension/templates/config.yaml.j2 | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/roles/matrix-dimension/tasks/validate_config.yml b/roles/matrix-dimension/tasks/validate_config.yml index f5960142b..69971a9b4 100644 --- a/roles/matrix-dimension/tasks/validate_config.yml +++ b/roles/matrix-dimension/tasks/validate_config.yml @@ -5,3 +5,11 @@ with_items: - "matrix_dimension_access_token" when: "matrix_dimension_enabled and vars[item] == ''" + +- name: Fail if Matrix Federation is disabled + fail: + msg: >- + You need to enable Matrix Federation to use Dimension. Set `{{ item }}` to 'true'. + with_items: + - "matrix_synapse_federation_enabled" + when: "matrix_dimension_enabled and matrix_synapse_federation_enabled == false" diff --git a/roles/matrix-dimension/templates/config.yaml.j2 b/roles/matrix-dimension/templates/config.yaml.j2 index 84403d3af..f5f29f4f5 100755 --- a/roles/matrix-dimension/templates/config.yaml.j2 +++ b/roles/matrix-dimension/templates/config.yaml.j2 @@ -17,7 +17,7 @@ homeserver: # The URL that Dimension should use when trying to communicate with federated APIs on # the homeserver. If not supplied or left empty Dimension will try to resolve the address # through the normal federation process. - federationUrl: "https://matrix-synapse:8448" + federationUrl: "http://matrix-synapse:8048" # The URL that Dimension will redirect media requests to for downloading media such as # stickers. If not supplied or left empty Dimension will use the clientServerUrl.