mirror of https://github.com/zulip/zulip.git
create stream: Before sending notificaion, check if NOTIFICATION_BOT exists.
There might be case that NOTIFICATION_BOT is none, so before sending stream announce notification, check first if settings.NOTIFICATION_BOT is not none.
This commit is contained in:
parent
db7943478e
commit
29905ad5d6
|
@ -374,7 +374,7 @@ def add_subscriptions_backend(
|
||||||
recipient_user=email_to_user_profile[email],
|
recipient_user=email_to_user_profile[email],
|
||||||
content=msg))
|
content=msg))
|
||||||
|
|
||||||
if announce and len(created_streams) > 0:
|
if announce and len(created_streams) > 0 and settings.NOTIFICATION_BOT is not None:
|
||||||
notifications_stream = user_profile.realm.get_notifications_stream()
|
notifications_stream = user_profile.realm.get_notifications_stream()
|
||||||
if notifications_stream is not None:
|
if notifications_stream is not None:
|
||||||
if len(created_streams) > 1:
|
if len(created_streams) > 1:
|
||||||
|
|
Loading…
Reference in New Issue