mirror of https://github.com/zulip/zulip.git
Disable empty-stream PMs for MIT bots.
(imported from commit a855d612b6ba316fc183200c4f72102831b6179c)
This commit is contained in:
parent
098720b6d1
commit
5ae5e3f881
|
@ -414,6 +414,9 @@ def check_stream_name(stream_name):
|
||||||
raise JsonableError("Invalid stream name")
|
raise JsonableError("Invalid stream name")
|
||||||
|
|
||||||
def check_if_a_bot_is_sending_a_message_to_an_empty_stream(sender, stream, 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 sender.is_bot and sender.bot_owner is not None:
|
||||||
if stream:
|
if stream:
|
||||||
num_subscribers = len(maybe_get_subscriber_emails(stream))
|
num_subscribers = len(maybe_get_subscriber_emails(stream))
|
||||||
|
|
Loading…
Reference in New Issue