diff options
author | Travis Ralston <travpc@gmail.com> | 2018-10-18 09:57:58 -0600 |
---|---|---|
committer | Travis Ralston <travpc@gmail.com> | 2018-10-18 09:57:58 -0600 |
commit | 49a044aa5f7a89594fca5556236126208ff7aa1c (patch) | |
tree | ab8f3bdea5294ed08bad2f5ab640063fbfd479e6 /synapse/push/mailer.py | |
parent | pep8 (diff) | |
parent | remove redundant changelog file (diff) | |
download | synapse-49a044aa5f7a89594fca5556236126208ff7aa1c.tar.xz |
Merge branch 'develop' into travis/login-terms
Diffstat (limited to 'synapse/push/mailer.py')
-rw-r--r-- | synapse/push/mailer.py | 5 |
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) |