Skip to content

fix(notifications): stop digest and announcement emails to users inactive for 90 days - #105

Merged
dylanjeffers merged 1 commit into
mainfrom
fix/email-inactive-sunset
Oct 7, 2026
Merged

dylanjeffers merged 1 commit into
mainfrom
fix/email-inactive-sunset

Conversation

@dylanjeffers

Copy link
Copy Markdown
Contributor

audius.co is over Gmail's 0.3% spam-complaint threshold, and users who have drifted away are the most likely to mark our emails as spam. Product approved stopping these emails for anyone who hasn't opened the app in 90 days.

Change

  • getRecentlyActiveUserIds checks discovery users.last_active_at. It's the same app-open ping that the inactivity re-engagement triggers use (findInactiveUsers); web and mobile have sent it since mid-June.
  • The daily/weekly digest drops users outside the 90-day window before fetching their notifications, and logs how many it skipped per batch.
  • Immediate announcement emails (legacy live users) apply the same check.
  • Users with no last_active_at count as inactive.
  • Transactional emails (purchases, withdrawals, rewards, welcome) and identity's security emails aren't affected. Push isn't affected.
  • getUserEmailFrequency now falls back to weekly instead of daily, matching fix(identity): make weekly the default email frequency apps#14639.
  • The createUsers test helper now sets last_active_at so the existing digest DB tests keep their users.

Testing

  • New unit tests for getRecentlyActiveUserIds (active subset, cutoff query, empty input).
  • tsc --noEmit shows no new errors (the only errors are unresolved @pedalboard/* workspace packages in this worktree).

🤖 Generated with Claude Code

…tive for 90 days

Digest and live announcement emails now only go to users whose
users.last_active_at (the app-open ping used by re-engagement) is within
90 days. Users with no last_active_at count as inactive. Transactional
emails are unchanged.

Also defaults the email frequency fallback to weekly, matching the
identity default change in AudiusProject/apps#14639.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dylanjeffers
dylanjeffers merged commit a2585fa into main Oct 7, 2026
2 checks passed
@dylanjeffers
dylanjeffers deleted the fix/email-inactive-sunset branch October 7, 2026 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant