diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2018-10-17 17:34:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-17 17:34:22 +0100 |
commit | f1bfe6167a5640caaf2f85a96b87e327132f3906 (patch) | |
tree | 1c1620912f5bdec15bd4f1cc43fe47a66a231b72 /synapse/push/mailer.py | |
parent | update changelog (diff) | |
parent | Put the warning blob at the top of the file (diff) | |
download | synapse-f1bfe6167a5640caaf2f85a96b87e327132f3906.tar.xz |
Merge pull request #4052 from matrix-org/rav/ship_resources_as_package_data
Ship the email templates as package_data
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) |