From 5ae5e3f8818c5a18dbbe256fbe0d1647ce7e12ae Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Thu, 19 Sep 2013 16:42:30 -0400 Subject: [PATCH] Disable empty-stream PMs for MIT bots. (imported from commit a855d612b6ba316fc183200c4f72102831b6179c) --- zerver/lib/actions.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zerver/lib/actions.py b/zerver/lib/actions.py index ee31ddffd8..35f3afcbd5 100644 --- a/zerver/lib/actions.py +++ b/zerver/lib/actions.py @@ -414,6 +414,9 @@ def check_stream_name(stream_name): raise JsonableError("Invalid stream name") def check_if_a_bot_is_sending_a_message_to_an_empty_stream(sender, stream, stream_name): + if sender.realm.domain == 'mit.edu': + return + if sender.is_bot and sender.bot_owner is not None: if stream: num_subscribers = len(maybe_get_subscriber_emails(stream))