zerver/lib/notifications: Add stream email notifications.

This modifies the logic for formatting outgoing missed-message emails
to support the upcoming stream email notifications feature (providing
a new format for the subject, etc.).
This commit is contained in:
Sarah
2017-11-20 21:11:13 -08:00
committed by Tim Abbott
parent 47df8c0c6e
commit 73f5be65e8
4 changed files with 129 additions and 0 deletions

View File

@@ -367,6 +367,8 @@ def do_send_missedmessage_events_reply_in_zulip(user_profile: UserProfile,
if m['trigger'] == 'mentioned'))
# TODO: When we add wildcard mentions that send emails, we
# should make sure the right logic applies here.
elif ('stream_email_notify' in unique_triggers):
context.update({'stream_email_notify': True})
else:
raise AssertionError("Invalid messages!")