[dev] [claudfuen] fix/suppress-inactive-org-emails#2494
Conversation
Skip organizations where no member has logged in within 90 days. Prevents sending emails to dead/abandoned addresses that may have become spam traps, which contributes to domain reputation damage. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryMedium Risk Overview Logging was updated to reflect the new “active org” filtering and the inactivity window. Reviewed by Cursor Bugbot for commit 16adc03. Bugbot is set up for automated code reviews on this repo. Configure here. |
Adds hasAccess and onboardingCompleted filters alongside the 90-day session check. This excludes ~4,087 orgs (831 ghost + 3,256 churned) from receiving weekly digest emails. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Looks good overall, clean change, correct logic, safe to merge
One request: add deactivated: false to the members.some filter in the where clause, so it matches the same member scope used in the select:
The select.members.where already excludes deactivated members when building email payloads, but the org-level activity check doesn't
Per Tofik's review - match the same member scope used in the select clause so deactivated members don't count as active. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
🎉 This PR is included in version 3.20.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This is an automated pull request to merge fix/suppress-inactive-org-emails into dev.
It was created by the [Auto Pull Request] action.