summary refs log tree commit diff
path: root/synapse/push/pusher.py
diff options
context:
space:
mode:
authorHubert Chathi <hubert@uhoreg.ca>2019-09-07 13:14:45 -0400
committerHubert Chathi <hubert@uhoreg.ca>2019-09-07 13:14:45 -0400
commit0d61d1d7351a8d2e2512dbcaf149e1f19f2271ec (patch)
tree9dccb1711608f8c0b3a6dcd22eaa6f100c7a4e17 /synapse/push/pusher.py
parentuse something that's the right type for user_id (diff)
parentServers-known-about statistic (#5981) (diff)
downloadsynapse-0d61d1d7351a8d2e2512dbcaf149e1f19f2271ec.tar.xz
Merge branch 'develop' into cross-signing_sig_upload
Diffstat (limited to 'synapse/push/pusher.py')
-rw-r--r--synapse/push/pusher.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/synapse/push/pusher.py b/synapse/push/pusher.py
index a9c64a9c54..f277aeb131 100644
--- a/synapse/push/pusher.py
+++ b/synapse/push/pusher.py
@@ -35,6 +35,7 @@ except Exception:
 class PusherFactory(object):
     def __init__(self, hs):
         self.hs = hs
+        self.config = hs.config
 
         self.pusher_types = {"http": HttpPusher}
 
@@ -42,12 +43,16 @@ class PusherFactory(object):
         if hs.config.email_enable_notifs:
             self.mailers = {}  # app_name -> Mailer
 
-            templates = load_jinja2_templates(
-                config=hs.config,
-                template_html_name=hs.config.email_notif_template_html,
-                template_text_name=hs.config.email_notif_template_text,
+            self.notif_template_html, self.notif_template_text = load_jinja2_templates(
+                self.config.email_template_dir,
+                [
+                    self.config.email_notif_template_html,
+                    self.config.email_notif_template_text,
+                ],
+                apply_format_ts_filter=True,
+                apply_mxc_to_http_filter=True,
+                public_baseurl=self.config.public_baseurl,
             )
-            self.notif_template_html, self.notif_template_text = templates
 
             self.pusher_types["email"] = self._create_email_pusher
 
@@ -78,6 +83,6 @@ class PusherFactory(object):
         if "data" in pusherdict and "brand" in pusherdict["data"]:
             app_name = pusherdict["data"]["brand"]
         else:
-            app_name = self.hs.config.email_app_name
+            app_name = self.config.email_app_name
 
         return app_name