Do not notify on stream messages by default for CUSTOMER19.

(imported from commit 7f737b9068ec39fc53678aa5c0976d3da908ce00)
This commit is contained in:
Jessica McKellar
2013-11-05 22:22:32 -05:00
parent 3daca0ca9c
commit 74d1a56c68

View File

@@ -794,10 +794,11 @@ def notify_subscriptions_added(user_profile, sub_pairs, stream_emails, no_log=Fa
tornado_callbacks.send_notification(notice) tornado_callbacks.send_notification(notice)
def notify_for_streams_by_default(user_profile): def notify_for_streams_by_default(user_profile):
# For users in newer realms, generate notifications for stream # For users in newer realms who are not CUSTOMER19, generate notifications for
# messages by default. # stream messages by default.
return user_profile.realm.date_created > datetime.datetime( return (user_profile.realm.date_created > datetime.datetime(
2013, 9, 24, tzinfo=timezone.utc) 2013, 9, 24, tzinfo=timezone.utc)) and \
(user_profile.realm.domain != "customer19.invalid")
def bulk_add_subscriptions(streams, users): def bulk_add_subscriptions(streams, users):
recipients_map = bulk_get_recipients(Recipient.STREAM, [stream.id for stream in streams]) recipients_map = bulk_get_recipients(Recipient.STREAM, [stream.id for stream in streams])