mirror of
https://github.com/zulip/zulip.git
synced 2025-10-28 18:43:52 +00:00
notifications: Add safeties to prevent incorrect notifications.
de04f0ad67changed now notifications recipients were calculated, in a manner that caused them to be sent when they should not have been.ac70a2d2e1was supposed to resolve this, but appears to have been insufficient, as all three of these cases have been observed to still happen. Add safety checks immediately before notification, until the underlying logic error can be sussed out.
This commit is contained in:
committed by
Tim Abbott
parent
5b45f8a128
commit
094f22e6b4
@@ -569,6 +569,10 @@ def handle_missedmessage_emails(
|
||||
# Never email bot users.
|
||||
return
|
||||
|
||||
if not user_profile.enable_offline_email_notifications:
|
||||
# BUG: Investigate why it's possible to get here.
|
||||
return # nocoverage
|
||||
|
||||
# Note: This query structure automatically filters out any
|
||||
# messages that were permanently deleted, since those would now be
|
||||
# in the ArchivedMessage table, not the Message table.
|
||||
|
||||
Reference in New Issue
Block a user