Skip to content

[BUG]: Owner message recipient resolution can send incorrect recipientId - #275

Merged
omkarhole merged 1 commit into
omkarhole:mainfrom
Aditya8369:250
Jun 2, 2026
Merged

[BUG]: Owner message recipient resolution can send incorrect recipientId#275
omkarhole merged 1 commit into
omkarhole:mainfrom
Aditya8369:250

Conversation

@Aditya8369

Copy link
Copy Markdown
Contributor

Implemented the frontend fix in frontend/src/components/ReferralDetail.jsx to prevent sending a message with an incorrect recipientId when the owner’s applicant list hasn’t loaded yet.

Changes made
Recipient selection race fix: updated the owner useEffect so it only sets selectedRecipientId when applicants.length > 0 (no fallback to applicants[0] while empty).
Send button disabled until resolved (owner only):
disabled={sendingMessage || (isOwner && !selectedRecipientId)}
Guard in handleSendMessage: already present, kept intact so owner posting cannot POST without a truthy recipientId.
Result
npm run build (Vite) succeeded after the changes.

closes #250

@vercel

vercel Bot commented Jun 2, 2026

Copy link
Copy Markdown

@Aditya8369 is attempting to deploy a commit to the omkarhole's projects Team on Vercel.

A member of the Team first needs to authorize it.

@omkarhole
omkarhole merged commit 708c543 into omkarhole:main Jun 2, 2026
0 of 2 checks passed
@omkarhole omkarhole added NSOC'26 Issues for the NSOC 2026 program level2 5 points labels Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

level2 5 points NSOC'26 Issues for the NSOC 2026 program

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: Owner message recipient resolution can send incorrect recipientId

2 participants