summary refs log tree commit diff
path: root/synapse/push/mailer.py
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2018-10-19 16:33:54 +0100
committerGitHub <noreply@github.com>2018-10-19 16:33:54 +0100
commitf62c597d14412521a628f0290acaa45bf192eb39 (patch)
treefaa8efbd7026502791c54b9569f05b40de4baa7e /synapse/push/mailer.py
parentFix manhole on py3 (pt 2) (#4067) (diff)
parentCalculate absolute path for email templates (diff)
downloadsynapse-f62c597d14412521a628f0290acaa45bf192eb39.tar.xz
Merge pull request #4069 from matrix-org/rav/fix_email_templates_4065
Calculate absolute path for email templates
Diffstat (limited to 'synapse/push/mailer.py')
-rw-r--r--synapse/push/mailer.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/synapse/push/mailer.py b/synapse/push/mailer.py
index b9dcfee740..16fb5e8471 100644
--- a/synapse/push/mailer.py
+++ b/synapse/push/mailer.py
@@ -526,12 +526,8 @@ def load_jinja2_templates(config):
     Returns:
         (notif_template_html, notif_template_text)
     """
-    logger.info("loading jinja2")
-
-    if config.email_template_dir:
-        loader = jinja2.FileSystemLoader(config.email_template_dir)
-    else:
-        loader = jinja2.PackageLoader('synapse', 'res/templates')
+    logger.info("loading email templates from '%s'", config.email_template_dir)
+    loader = jinja2.FileSystemLoader(config.email_template_dir)
     env = jinja2.Environment(loader=loader)
     env.filters["format_ts"] = format_ts_filter
     env.filters["mxc_to_http"] = _create_mxc_to_http_filter(config)