summary refs log tree commit diff
path: root/synapse/push/mailer.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2016-05-17 10:43:58 +0100
committerMark Haines <mark.haines@matrix.org>2016-05-17 10:43:58 +0100
commit523d5bcd0b4883c5046e52d62db59ff588e342c1 (patch)
tree2e03fdf537731d9a8d1e8f7a0feaaeb0c9d84eb8 /synapse/push/mailer.py
parentMove SyncHandler out of the Handlers object (diff)
parentMerge pull request #786 from matrix-org/matthew/email_notifs_tuning (diff)
downloadsynapse-523d5bcd0b4883c5046e52d62db59ff588e342c1.tar.xz
Merge remote-tracking branch 'origin/develop' into markjh/liberate_sync_handler
Diffstat (limited to '')
-rw-r--r--synapse/push/mailer.py7
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)