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.

email_notifications: Avoid trying to email to bot users.

Tim Abbott24b1439e9333
diff --git a/zerver/lib/email_notifications.py b/zerver/lib/email_notifications.py
index 530460edaf7..84a883c50fd 100644
--- a/zerver/lib/email_notifications.py
+++ b/zerver/lib/email_notifications.py
@@ -584,6 +584,9 @@ def handle_missedmessage_emails(
}
user_profile = get_user_profile_by_id(user_profile_id)
+ if user_profile.is_bot: # nocoverage # TODO -- needs a test.
+ # Never email bot users.
+ return
# Note: This query structure automatically filters out any
# messages that were permanently deleted, since those would now be