fix(feedback): suppress admin notification and email for honeypot spam #338
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/BUNYIP-270-suppress-spam-feedback-admin-notification"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The admin feedback dashboard's Active tab is backed by a list query that filters
is_spam = FALSE, so honeypot-flagged spam submissions never appear there.submit_feedback, however, raised the in-appNewFeedbacknotification and sent the admin notification email unconditionally, including for spam. Admins therefore received a "new feedback submitted" email but opened/admin/feedbackto an empty Active queue: the row existed only under the Spam tab. This is the mismatch reported in BUNYIP-270 (email fires, dashboard empty).Gate the admin notification + email on a new
should_notify_admins_of_feedback(is_spam)predicate so admins are pinged only for submissions that land in the Active queue. Legit feedback (is_spam = FALSE) still notifies, emails, and appears in Active unchanged; spam is still stored, audit-logged, and visible under the Spam tab, but no longer pings admins. The predicate is factored out and covered by unit tests so the invariant cannot silently regress to an unconditional ping.#BUNYIP-270