Repository navigation
Description
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: v9.3.69-3
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/folder/13176726/test-cases/41237090
Email or phone of affected tester (no customers): lattelover1412+090511@gmail.com
Issue reported by: Applause Internal Team
Bug source: Regression TC Execution
Device used: Win11/Chrome
App Component: Other
Action Performed:
-
Go to staging.new.expensify.com
-
Register as a new user to the app
-
Select “Manage my team’s expenses” and click Continue
-
Add a name for your business
-
Fill out a first & last name
-
Create a #room in the workspace
-
Click on the header of the room and navigate to Members
-
Click on the Invite button at the top
-
Invite an email address that does not have an expensify account (Should be a real account with an inbox that can receive the invite)
-
Open the Invitation mail box that was sent to the new user (step 9)
Expected Result:
After user invite email address that does not have an expensify account, a whisper message with option "invite to chat" displayed and invitation mail box should be sent then user able to proceed further steps.
Actual Result:
There is no whisper message "invite to chat" displayed and The member invited through the mentioned way doesn't get the invite email
Note: There is closed git #74788
Workaround:
Unknown
Platforms:
- Android: App
- Android: mWeb Chrome
- iOS: App
- iOS: mWeb Safari
- iOS: mWeb Chrome
- Windows: Chrome
- MacOS: Chrome / Safari
Screenshots/Videos
Video.mp4
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022053715853772050379
- Upwork Job ID: 2053715853772050379
- Last Price Increase: 2026-05-25
- Automatic offers:
- wildan-m | Contributor | 111765314
Issue Owner
Current Issue Owner: @mallenexpensifyMetadata
Metadata
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
MelvinBot commentedon May 11, 2026
Issue Analysis
Root Cause: This is a backend issue. The App client correctly sends the
InviteToRoomAPI command with the non-Expensify email — no client-side filtering excludes external accounts. The system message (ROOM_CHANGE_LOG.INVITE_TO_ROOM) and the invite email are both created entirely server-side by theInviteToRoombackend command, which appears to be failing silently for non-Expensify email addresses.Note on the "invite to chat" whisper: The "invite to chat" whisper mentioned in the bug report is the
ACTIONABLE_MENTION_WHISPER, which is a separate flow triggered by @mentioning a non-member in a message — it is not part of the Room > Members > Invite flow. The Room > Members > Invite flow should produce aROOM_CHANGE_LOG.INVITE_TO_ROOMsystem message instead.Recommended Fix: Investigate the backend
InviteToRoomcommand handler to determine why it is not creating the system message or sending the invite email for non-Expensify (unregistered) email addresses. The client sends{reportID, inviteeEmails, accountIDList}— for unknown users,accountIDListcontains client-generated optimistic IDs that the server should ignore in favor of looking up or creating accounts by email.Investigation details
Client-side flow (verified — working correctly)
RoomInvitePage.tsx:191-214—inviteUsers()builds aninvitedEmailsToAccountIDsmap. For unknown emails, accountID falls back toCONST.DEFAULT_NUMBER_ID(0) or an optimistic hash-based ID. For non-policy-expense-chat rooms, callsinviteToRoom().Report/index.ts:4878-4901—inviteToRoom()callsbuildInviteToRoomOnyxData()then sendsWRITE_COMMANDS.INVITE_TO_ROOMwith parameters{reportID, inviteeEmails, accountIDList}.Report/index.ts:4787-4791—inviteeEmailscontains ALL invited emails, butaccountIDListis filtered viagetNewAccountIDsAndLogins()to only include IDs for users not already inallPersonalDetails. For a single unknown email, both arrays align (length 1).RoomInvitePage.tsx:112-121— Excluded users are only Expensify system emails and existing participants. Non-Expensify external emails are not filtered out.What the server should do
When
InviteToRoomreceives a request with an unregistered email:ROOM_CHANGE_LOG.INVITE_TO_ROOMreport action (system message)Steps 3 and 4 are not happening, indicating the backend command may be silently failing or skipping these steps for non-existent accounts.
Alternative explanation considered
Could the
accountIDListmismatch cause the issue? For a single unknown email invite,inviteeEmails=["email@example.com"]andaccountIDList=["<optimisticID>"]— both length 1, so no mismatch. The mismatch only occurs when mixing known + unknown users in one invite. This doesn't explain the bug for the single-user case described in the report.Next Steps: Reply with
@MelvinBot <your feedback>to refine this analysis.melvin-bot commentedon May 11, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ikevin127 (
External)wildan-m commentedon May 11, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a member is invited into a #room chat by mentioning their email in the chat (the email belongs to a person who does not yet have an Expensify account) and the inviter then clicks the "Invite to chat only" button on the resulting actionable mention whisper, the invited person is added to the room participants but never receives the welcome / invite email in their inbox. Inviting the same person from the room's Members page → Invite button sends the email correctly, so the two invite paths behave inconsistently. This is a regression that matches BrowserStack test case 41237090 and the previously closed #74788.
What is the root cause of that problem?
There are two server-side commands involved in inviting somebody to a room:
INVITE_TO_ROOM, used by the Members page → Invite flow, which is called with an explicitinviteeEmailsarray and anaccountIDListdescribing who is being added. The backend uses this explicit invitee list to fan out the invite email to each new login.RESOLVE_ACTIONABLE_MENTION_WHISPER, used when the inviter clicks "Invite to chat only" on the whisper produced by an unresolved mention. Look at how the frontend currently builds the parameters for this command:App/src/libs/actions/Report/index.ts
Lines 5687 to 5692 in b7c38b1
Only
reportActionIDandresolutionare sent. There is noreportIDand noinviteeEmailsin the request body. The parameter type itself only allows those two fields:App/src/libs/API/parameters/ResolveActionableMentionWhisperParams.ts
Lines 4 to 7 in b7c38b1
As a result the backend has no explicit invitee data on this code path. It knows the whisper got resolved and it adds the mentioned users as participants of the room, but unlike
INVITE_TO_ROOMit does not have the structured(reportID, inviteeEmails)pair it needs to enqueue the invite email job. The invited person therefore ends up inside the room without ever receiving the welcome / invite email — exactly the actual result reported in the issue.The data the backend needs is already sitting on the report action itself. The actionable mention whisper's
originalMessagecarries the unresolved invitee logins under theinviteeEmailsfield, declared here:App/src/types/onyx/OriginalMessage.ts
Lines 140 to 156 in b7c38b1
So the frontend has everything it needs to mirror the parameters that
INVITE_TO_ROOMsends; it just is not forwarding them.What changes do you think we should make in order to solve the problem?
Make the "Invite to chat only" path send the same identifying information that the Members page → Invite path sends, so the backend can trigger the invite email for the resolved whisper exactly the way it does for a direct Members page invite.
Concretely:
Extend the
ResolveActionableMentionWhisperParamstype to allow two additional optional fields:reportIDandinviteeEmails: string[]. They are kept optional because the same command is also used for the "Do nothing" resolution and for the submit-expense confirm whisper, where invitee data is not needed.In
resolveActionableMentionWhisperinsidesrc/libs/actions/Report/index.ts, when the resolution isCONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE, read theoriginalMessageof the actionable mention whisper (the function already retrieves it for the optimistic participant update logic) and attachreportIDplusoriginalMessage.inviteeEmailsto the params object before callingAPI.write(WRITE_COMMANDS.RESOLVE_ACTIONABLE_MENTION_WHISPER, ...). For other resolutions (and for the confirm-whisper variant where the original message does not carryinviteeEmails) the new fields should be omitted, so behavior on those paths is unchanged.After this change, when "Invite to chat only" is clicked the backend receives the same
(reportID, inviteeEmails)pair it already receives from the Members page invite, which is what it needs to send the welcome / invite email to each newly added login. The new fields are additive and optional, so existing call sites and backend handling for the non-invite resolutions are not affected.No string, navigation, or Onyx changes are needed; the optimistic participant update added by #88795 / #89363 already covers the in-app side of the flow, so this purely closes the email-sending half of the same fix.
Compare branch: https://github.com/Expensify/App/compare/main...wildan-m:App:wildan/90141-resolve-mention-invite-email?expand=1
What alternative solutions did you explore? (Optional)
Looking up the invitee data on the backend from the persisted report action keyed by
reportActionID(so the frontend would not need to change). This would avoid touching the parameter type, but it pushes a frontend-known piece of data into a server-side lookup for no real benefit, increases coupling between the resolve command and the actionable whisper's storage layout, and is inconsistent with how the Members page invite already passes the same data explicitly. Forwarding the fields the frontend already has is the smaller, more symmetric change.KJ21-ENG commentedon May 11, 2026
🚫 Duplicated proposal withdrawn by 🤖 ProposalPolice.
[-]Email - Member invite with mention in room chat doesn't get the invite email[/-][+][$250] Email - Member invite with mention in room chat doesn't get the invite email[/+]melvin-bot commentedon May 11, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022053715853772050379
github-actions commentedon May 11, 2026
yusufdeveloper2903 commentedon May 11, 2026
🚨 Edited by proposal-police: This proposal was edited at 2026-06-18 16:54:51 UTC.
Proposal
What is the root cause of that problem?
There are two parts to this bug, and the second (frontend) part is where the existing proposals fall short.
1. The email suppression itself is a backend regression (already diagnosed in-thread). As confirmed by @amyevans / @mollfpr, the invite email stopped being sent because of Web-Expensify#52233 (deployed 4/24), which filtered system messages out of email notifications unless they are sandwiched between two regular messages.
ACTION_INVITE_TO_ROOMgot caught by that filter, so the welcome/invite email is suppressed entirely. This is being fixed server-side under E/E 642081 (the current HOLD).2. The remaining frontend gap is that the whisper-resolve command doesn't carry the invitee identity the backend needs — and it must do so for both invite resolutions, not just one.
The Members → Invite path (
inviteToRoom) sends the backend the full identity payload{reportID, inviteeEmails, accountIDList}, which is what lets the backend fan out the invite email:App/src/libs/actions/Report/index.ts
Lines 4997 to 5004 in d81cc58
The whisper path (
resolveActionableMentionWhisper) does not — it sends onlyreportActionIDandresolution:App/src/libs/actions/Report/index.ts
Lines 5789 to 5794 in d81cc58
This is constrained by the param type, which only declares those two fields:
App/src/libs/API/parameters/ResolveActionableMentionWhisperParams.ts
Lines 4 to 7 in d81cc58
So far this matches the existing proposals. The piece they miss: the
MentionWhisperContentwhisper exposes two invite options that both route throughresolveActionableMentionWhisperand both invite a non-member — "Invite to submit expenses" (INVITE_TO_SUBMIT_EXPENSE) and "Invite to chat only" (INVITE):App/src/pages/inbox/report/actionContents/MentionWhisperContent.tsx
Lines 51 to 74 in d81cc58
The two resolution values are distinct constants:
App/src/CONST/index.ts
Lines 1835 to 1839 in d81cc58
But the action's
isInviteResolutionflag — which gates the invite-specific behavior (optimistic participant add today, and the param forward the fix needs to add) — only matchesINVITE:App/src/libs/actions/Report/index.ts
Lines 5700 to 5704 in d81cc58
This is exactly what @ikevin127 called out as the requirement: "ResolveActionableMentionWhisper (for both 'invite to submit expenses' OR 'invite for chat only' since these 2 should send the email)". A fix that forwards the identity only for
resolution === INVITE(as the current proposals do) leaves the "Invite to submit expenses" whisper still emailless after the backend fix lands — the same root cause surviving in the sibling resolution.The data the backend needs is already on the report action and already retrieved one line above the gate —
originalMessage.inviteeEmails:App/src/types/onyx/OriginalMessage.ts
Lines 143 to 148 in d81cc58
So: BE filter suppresses the email (fixed under E/E 642081) → FE whisper-resolve never echoes
(reportID, inviteeEmails)the wayInviteToRoomdoes → and the one place that should echo it is gated toINVITEonly, so even the partial FE fixes proposed so far would miss theINVITE_TO_SUBMIT_EXPENSEwhisper.What changes do you think we should make in order to solve the problem?
Make the whisper-resolve path forward the same identity payload
InviteToRoomalready sends, for both invite resolutions — reusing the data and theisInviteResolutionflag already in scope.isInviteResolutionatReport/index.ts#L5700to cover the submit-expense resolution too:Because the optimistic participant logic at L5702-L5704 already keys off this same flag, this also makes the "Invite to submit expenses" path optimistically add the member to the room — matching the chat-only path's behavior added in #93856.
Add two optional fields to
ResolveActionableMentionWhisperParams(reportID?: stringandinviteeEmails?: string[]). They stay optional because the same command is reused for theNOTHINGresolution and the submit-expense confirm whisper, which carry no invitee data.In the params build at L5789, attach
reportIDandoriginalMessage.inviteeEmails(both already in scope —reportIDfrom L5667,originalMessagefrom L5701) whenisInviteResolution:This makes the resolve request carry exactly the
{reportID, inviteeEmails}payload @ikevin127 captured in the thread, mirroringInviteToRoom, for both invite buttons. Combined with the E/E 642081 backend fix, the invite email is then sent for both "Invite to chat only" and "Invite to submit expenses". The fields are additive/optional, soNOTHINGand the confirm-whisper path are unchanged. Minor changes/improvements can be discussed in the PR phase.What alternative solutions did you explore? (Optional)
Forward the identity only for
resolution === INVITE(what the existing proposals do). Rejected: it leaves the "Invite to submit expenses" whisper still emailless, since that resolution flows through the sameresolveActionableMentionWhispercommand but never matches the narrowINVITEgate — directly contradicting the reviewer's stated requirement that both options send the email. Broadening the singleisInviteResolutionflag fixes both paths with one symmetric change and also brings the optimistic member-add to the submit-expense path for free.wildan-m commentedon May 11, 2026
Proposal updated — added compare branch with implementation.
61 remaining items
ikevin127 commentedon Jul 9, 2026
BugZero Checklist:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: N/A - Result of the original design
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue: https://github.com/Expensify/Expensify/issues/661245
Regression Test Proposal
#roomwhere you are an admin (e.g. a workspace room).@-mentionan email address that does NOT have an Expensify account — use a+aliasof your own Gmail so it has no Expensify account but still lands in your inbox (e.g. if your Gmail isyouremail@gmail.com, useyouremail+test@gmail.com) — and send the message.invited @<email>action appears).Do we agree 👍 or 👎.
Zapier Logs
Run ID: 00040eee-8c9b-a6ce-63e8-5cf517b7a4d4melvin-bot commentedon Jul 15, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)mallenexpensify commentedon Jul 17, 2026
Payment Summary
Contributor: @wildan-m paid $250 via Upwork
Contributor+: @ikevin127 due $250 via NewDot
^ Test case created. Thx
quinthar commentedon Jul 22, 2026
Approved $250 to @ikevin127