summary refs log tree commit diff
path: root/synapse/config/account_validity.py
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2021-08-17 14:45:24 +0200
committerGitHub <noreply@github.com>2021-08-17 14:45:24 +0200
commit56397599809e131174daaeb4c6dc18fde9db6c3f (patch)
tree89143336c80709dcab3834eeae1af9d6de069254 /synapse/config/account_validity.py
parentAttempt to pull from the legacy spaces summary API over federation. (#10583) (diff)
downloadsynapse-56397599809e131174daaeb4c6dc18fde9db6c3f.tar.xz
Centralise the custom template directory (#10596)
Several configuration sections are using separate settings for custom template directories, which can be confusing. This PR adds a new top-level configuration for a custom template directory which is then used for every module. The only exception is the consent templates, since the consent template directory require a specific hierarchy, so it's probably better that it stays separate from everything else.
Diffstat (limited to 'synapse/config/account_validity.py')
-rw-r--r--synapse/config/account_validity.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/synapse/config/account_validity.py b/synapse/config/account_validity.py
index 9acce5996e..52e63ab1f6 100644
--- a/synapse/config/account_validity.py
+++ b/synapse/config/account_validity.py
@@ -78,6 +78,11 @@ class AccountValidityConfig(Config):
         )
 
         # Read and store template content
+        custom_template_directories = (
+            self.root.server.custom_template_directory,
+            account_validity_template_dir,
+        )
+
         (
             self.account_validity_account_renewed_template,
             self.account_validity_account_previously_renewed_template,
@@ -88,5 +93,5 @@ class AccountValidityConfig(Config):
                 "account_previously_renewed.html",
                 invalid_token_template_filename,
             ],
-            (td for td in (account_validity_template_dir,) if td),
+            (td for td in custom_template_directories if td),
         )