diff options
author | Richard van der Hoff <richard@matrix.org> | 2018-10-18 15:07:03 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2018-10-18 15:07:03 +0100 |
commit | c632bc865448b40d246878e2d6c9287621b4ba0e (patch) | |
tree | d126c9cba47f70f40cee6acebac8f1cf93599e66 /synapse/push/mailer.py | |
parent | Merge pull request #4049 from matrix-org/erikj/synctl_colour (diff) | |
parent | 0.33.7 (diff) | |
download | synapse-c632bc865448b40d246878e2d6c9287621b4ba0e.tar.xz |
Merge branch 'master' into develop
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) |