Skip to content

Commit

Permalink
Add appeal reviewers
Browse files Browse the repository at this point in the history
  • Loading branch information
Devorein committed Jan 17, 2025
1 parent ddccdcc commit a2209c1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/notifications/documents/createDocumentNotifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,11 @@ export async function createDocumentNotifications(webhookData: {

const proposalId = document?.type === 'proposal' ? document?.proposal?.id : null;
const proposalReviewerUserIds = Array.from(
new Set(document?.proposal?.reviewers.map((reviewer) => reviewer.userId).filter(isTruthy) ?? [])
new Set(
[...(document?.proposal?.reviewers ?? []), ...(document?.proposal?.ProposalAppealReviewer ?? [])]
.map((reviewer) => reviewer.userId)
.filter(isTruthy) ?? []
)
).filter((userId) => userId !== commentAuthorId && !notificationSentUserIds.has(userId));

if (documentId && proposalId && space.domain === 'op-grants' && proposalReviewerUserIds.length) {
Expand Down

0 comments on commit a2209c1

Please sign in to comment.