Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b928a2d79e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| requiredPermission && | ||
| !isGeneralActivity && | ||
| !checkPermission(recipient.permissions || [], [requiredPermission]) | ||
| ) { |
There was a problem hiding this comment.
Don't filter explicit recipients by global permission
This permission check can drop users that were already explicitly targeted via metadata.forUserIds. In joinCommunity, recipients are selected from community memberships (role: MODERATE) rather than user.permissions, so moderators without global community:manage will be skipped here and never receive COMMUNITY_MEMBERSHIP_REQUESTED notifications despite being in the target list. For targeted notifications, this gate creates false negatives.
Useful? React with 👍 / 👎.
| await Promise.allSettled( | ||
| Array.from(new Set(preference.channels)).map((channel) => { |
There was a problem hiding this comment.
Propagate channel failures so dispatch jobs can retry
Using Promise.allSettled here and ignoring its rejected results makes the worker report success even when channel delivery fails. That bypasses the BullMQ retry policy configured for this queue (attempts/backoff), so transient failures in app/email channel sends are silently dropped instead of being retried.
Useful? React with 👍 / 👎.
What's new
Migration required
apps/web/.migrations/17-02-26_18-10-seed-notification-preferences.js