Skip to content

feat(notifications): skip non-account emails for inactive users#4744

Draft
SylvainChevalier wants to merge 1 commit into
mainfrom
claude/issue-4677-users-with-activefalse-shouldnt-get
Draft

feat(notifications): skip non-account emails for inactive users#4744
SylvainChevalier wants to merge 1 commit into
mainfrom
claude/issue-4677-users-with-activefalse-shouldnt-get

Conversation

@SylvainChevalier
Copy link
Copy Markdown
Contributor

Closes #4677.

Users with is_active=False now only receive account-related emails (activation, password reset, email change confirmation, signup invite, deactivation notice). All other notification and digest emails are suppressed for inactive recipients, filtered at the user-queryset boundaries and in the notification scheduling/delivery pipeline.

Generated with Claude Code

Users with is_active=False should only receive account-related emails
(activation, password reset, email change confirmation, signup invite,
deactivation notice). Filter inactive recipients out of:
- the Notification scheduling/delivery pipeline
- comment mention notifications
- weekly top-comments digest
- forecast auto-withdrawal warnings
- multiple-choice option add/remove notifications
- staff comment/key-factor report notifications
- news category notebook publish notifications

Fixes #4677

Co-authored-by: Sylvain <SylvainChevalier@users.noreply.github.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 19, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 84fb3f32-7e41-4cf2-9710-accc6fe09abf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/issue-4677-users-with-activefalse-shouldnt-get

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@SylvainChevalier
Copy link
Copy Markdown
Contributor Author

@hlbmtc I know you're looking at emails, feel free to ignore if redundant.

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Preview Environment

Your preview environment is ready!

Resource Details
🌐 Preview URL https://metaculus-pr-4744-claude-issue-4677-users-with-a-preview.mtcl.cc
📦 Docker Image ghcr.io/metaculus/metaculus:claude-issue-4677-users-with-activefalse-shouldnt-get-99d3aaf
🗄️ PostgreSQL NeonDB branch preview/pr-4744-claude-issue-4677-users-with-a
Redis Fly Redis mtc-redis-pr-4744-claude-issue-4677-users-with-a

Details

  • Commit: 5b2f1e7a2a907a9f740b7ac0bb3ae0942aec8f6d
  • Branch: claude/issue-4677-users-with-activefalse-shouldnt-get
  • Fly App: metaculus-pr-4744-claude-issue-4677-users-with-a

ℹ️ Preview Environment Info

Isolation:

  • PostgreSQL and Redis are fully isolated from production
  • Each PR gets its own database branch and Redis instance
  • Changes pushed to this PR will trigger a new deployment

Limitations:

  • Background workers and cron jobs are not deployed in preview environments
  • If you need to test background jobs, use Heroku staging environments

Cleanup:

  • This preview will be automatically destroyed when the PR is closed

@SylvainChevalier SylvainChevalier requested a review from hlbmtc May 19, 2026 15:49
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.

Users with active=False shouldn't get emails except account related ones

1 participant