mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 15:54:49 -04:00
Allow using several custom template directories (#10587)
Allow using several directories in read_templates.
This commit is contained in:
parent
a933c2c7d8
commit
ae2714c1f3
7 changed files with 97 additions and 26 deletions
|
@ -257,7 +257,9 @@ class EmailConfig(Config):
|
|||
registration_template_success_html,
|
||||
add_threepid_template_success_html,
|
||||
],
|
||||
template_dir,
|
||||
(
|
||||
td for td in (template_dir,) if td
|
||||
), # Filter out template_dir if not provided
|
||||
)
|
||||
|
||||
# Render templates that do not contain any placeholders
|
||||
|
@ -297,7 +299,7 @@ class EmailConfig(Config):
|
|||
self.email_notif_template_text,
|
||||
) = self.read_templates(
|
||||
[notif_template_html, notif_template_text],
|
||||
template_dir,
|
||||
(td for td in (template_dir,) if td),
|
||||
)
|
||||
|
||||
self.email_notif_for_new_users = email_config.get(
|
||||
|
@ -320,7 +322,7 @@ class EmailConfig(Config):
|
|||
self.account_validity_template_text,
|
||||
) = self.read_templates(
|
||||
[expiry_template_html, expiry_template_text],
|
||||
template_dir,
|
||||
(td for td in (template_dir,) if td),
|
||||
)
|
||||
|
||||
subjects_config = email_config.get("subjects", {})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue