Disable digests and Missed Message notifications for internal realm.

(imported from commit 24a25bcf6653c674ac8a34324a4674e438f0af38)
This commit is contained in:
Tim Abbott 2015-02-05 17:40:34 -08:00
parent 1dbe00f164
commit 4f1388706c
2 changed files with 8 additions and 3 deletions

View File

@ -202,7 +202,9 @@ def do_send_missedmessage_events_reply_in_zulip(user_profile, missed_messages, m
`missed_messages` is a list of Message objects to remind about they should `missed_messages` is a list of Message objects to remind about they should
all have the same recipient and subject all have the same recipient and subject
""" """
if not user_profile.enable_offline_email_notifications: # Disabled missedmessage emails internally
if (not user_profile.enable_offline_email_notifications
or user_profile.realm.domain == "zulip.com"):
return return
recipients = set((msg.recipient_id, msg.subject) for msg in missed_messages) recipients = set((msg.recipient_id, msg.subject) for msg in missed_messages)
@ -254,7 +256,9 @@ def do_send_missedmessage_events(user_profile, missed_messages, message_count):
`user_profile` is the user to send the reminder to `user_profile` is the user to send the reminder to
`missed_messages` is a list of Message objects to remind about `missed_messages` is a list of Message objects to remind about
""" """
if not user_profile.enable_offline_email_notifications: # Disabled missedmessage emails internally
if (not user_profile.enable_offline_email_notifications
or user_profile.realm.domain == "zulip.com"):
return return
senders = set(m.sender.full_name for m in missed_messages) senders = set(m.sender.full_name for m in missed_messages)

View File

@ -94,7 +94,8 @@ in a while.
deactivated=False).values_list('domain', flat=True) deactivated=False).values_list('domain', flat=True)
# This list much match the list of domains for the # This list much match the list of domains for the
# dont_show_digest_email_setting feature flag. # dont_show_digest_email_setting feature flag.
non_digest_domains = set(("mit.edu", "customer29.invalid", "customer20.invalid")) non_digest_domains = set(("mit.edu", "customer29.invalid",
"customer20.invalid", "zulip.com"))
digest_domains = set(all_domains) - non_digest_domains digest_domains = set(all_domains) - non_digest_domains
deployment_domains = domains_for_this_deployment() deployment_domains = domains_for_this_deployment()