mirror of
https://github.com/zulip/zulip.git
synced 2025-11-16 11:52:01 +00:00
actions: Fix errors when notifications_stream is deactivated.
This commit is contained in:
@@ -229,14 +229,15 @@ def send_signup_message(sender, signups_stream, user_profile,
|
|||||||
internal_blurb = " "
|
internal_blurb = " "
|
||||||
|
|
||||||
user_count = realm_user_count(user_profile.realm)
|
user_count = realm_user_count(user_profile.realm)
|
||||||
|
notifications_stream = user_profile.realm.get_notifications_stream()
|
||||||
# Send notification to realm notifications stream if it exists
|
# Send notification to realm notifications stream if it exists
|
||||||
# Don't send notification for the first user in a realm
|
# Don't send notification for the first user in a realm
|
||||||
if user_profile.realm.notifications_stream is not None and user_count > 1:
|
if notifications_stream is not None and user_count > 1:
|
||||||
internal_send_message(
|
internal_send_message(
|
||||||
user_profile.realm,
|
user_profile.realm,
|
||||||
sender,
|
sender,
|
||||||
"stream",
|
"stream",
|
||||||
user_profile.realm.notifications_stream.name,
|
notifications_stream.name,
|
||||||
"New users", "%s just signed up for Zulip. Say hello!" % (
|
"New users", "%s just signed up for Zulip. Say hello!" % (
|
||||||
user_profile.full_name,)
|
user_profile.full_name,)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user