Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

notifications: Skip profile update notifications for deactivated users.

The Dance0f65e36f93d9
diff --git a/zerver/actions/message_send.py b/zerver/actions/message_send.py
index 4b0d1d27867..b106742d94e 100644
--- a/zerver/actions/message_send.py
+++ b/zerver/actions/message_send.py
@@ -2217,7 +2217,10 @@ def send_user_profile_update_notification(
acting_user: UserProfile | None,
changes: list[UserProfileChangeDict],
) -> None:
- if (acting_user is not None and acting_user.id == user_profile.id) or user_profile.is_bot:
+ if not user_profile.is_active or user_profile.is_bot:
+ return
+
+ if acting_user is not None and acting_user.id == user_profile.id:
return
notification_bot = get_system_bot(settings.NOTIFICATION_BOT, user_profile.realm_id)