mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 15:33:30 +00:00
invitations: Don't notify now-deactivated users.
While accepting an invitation from a user, there was no condition in place to check if the user sending the invitation was now now-deactivated. Skip sending notifications about newly-joined users to users who are now disabled. Fixes #18569.
This commit is contained in:
@@ -503,7 +503,12 @@ def process_new_human_user(
|
||||
add_new_user_history(user_profile, streams)
|
||||
|
||||
# mit_beta_users don't have a referred_by field
|
||||
if not mit_beta_user and prereg_user is not None and prereg_user.referred_by is not None:
|
||||
if (
|
||||
not mit_beta_user
|
||||
and prereg_user is not None
|
||||
and prereg_user.referred_by is not None
|
||||
and prereg_user.referred_by.is_active
|
||||
):
|
||||
# This is a cross-realm private message.
|
||||
with override_language(prereg_user.referred_by.default_language):
|
||||
internal_send_private_message(
|
||||
|
||||
Reference in New Issue
Block a user