summary refs log tree commit diff
path: root/synapse/push/mailer.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2018-10-19 15:48:59 +0100
committerErik Johnston <erik@matrix.org>2018-10-19 15:48:59 +0100
commit056f0991262902e22f0414e17c01198e1606384a (patch)
treefa365dc1aef28f86499122d8b9176c03dd95e863 /synapse/push/mailer.py
parentBatch process handling state groups (diff)
parentFix manhole on py3 (pt 2) (#4067) (diff)
downloadsynapse-056f0991262902e22f0414e17c01198e1606384a.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/purge_state_groups
Diffstat (limited to 'synapse/push/mailer.py')
-rw-r--r--synapse/push/mailer.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/push/mailer.py b/synapse/push/mailer.py
index 1a5a10d974..b9dcfee740 100644
--- a/synapse/push/mailer.py
+++ b/synapse/push/mailer.py
@@ -528,7 +528,10 @@ def load_jinja2_templates(config):
     """
     logger.info("loading jinja2")
 
-    loader = jinja2.FileSystemLoader(config.email_template_dir)
+    if config.email_template_dir:
+        loader = jinja2.FileSystemLoader(config.email_template_dir)
+    else:
+        loader = jinja2.PackageLoader('synapse', 'res/templates')
     env = jinja2.Environment(loader=loader)
     env.filters["format_ts"] = format_ts_filter
     env.filters["mxc_to_http"] = _create_mxc_to_http_filter(config)