diff options
author | Matthew Hodgson <matthew@matrix.org> | 2016-05-16 18:58:38 +0100 |
---|---|---|
committer | Matthew Hodgson <matthew@matrix.org> | 2016-05-16 18:58:38 +0100 |
commit | cbd2adc95e793cb232263efd05b025d6098356af (patch) | |
tree | 09fdb3cf2fbb3368911039d4caa03c8e0ab4184a /synapse/push/mailer.py | |
parent | rogue img (diff) | |
download | synapse-cbd2adc95e793cb232263efd05b025d6098356af.tar.xz |
tune email notifs, fix CSS a bit, and add debugging details
Diffstat (limited to 'synapse/push/mailer.py')
-rw-r--r-- | synapse/push/mailer.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/synapse/push/mailer.py b/synapse/push/mailer.py index 2fd38a036a..c2c2ca3fa7 100644 --- a/synapse/push/mailer.py +++ b/synapse/push/mailer.py @@ -92,7 +92,7 @@ class Mailer(object): ) @defer.inlineCallbacks - def send_notification_mail(self, user_id, email_address, push_actions): + def send_notification_mail(self, user_id, email_address, push_actions, reason): raw_from = email.utils.parseaddr(self.hs.config.email_notif_from)[1] raw_to = email.utils.parseaddr(email_address)[1] @@ -143,12 +143,17 @@ class Mailer(object): notifs_by_room, state_by_room, notif_events, user_id ) + reason['room_name'] = calculate_room_name( + state_by_room[reason['room_id']], user_id, fallback_to_members=False + ) + template_vars = { "user_display_name": user_display_name, "unsubscribe_link": self.make_unsubscribe_link(), "summary_text": summary_text, "app_name": self.app_name, "rooms": rooms, + "reason": reason, } html_text = self.notif_template_html.render(**template_vars) |