fix: unify invite message text#65888
Conversation
| if ( | ||
| !isActionOfType(reportAction, CONST.REPORT.ACTIONS.TYPE.ROOM_CHANGE_LOG.INVITE_TO_ROOM) && | ||
| !isActionOfType(reportAction, CONST.REPORT.ACTIONS.TYPE.ROOM_CHANGE_LOG.REMOVE_FROM_ROOM) | ||
| ) { | ||
| return ''; |
There was a problem hiding this comment.
Lines 1253 to 1258 in fc59fcb
For system messages of the other two types, is it expected to make them empty?
There was a problem hiding this comment.
We fallback if lastMessageTextFromReport is empty here:
App/src/libs/OptionsListUtils.ts
Line 884 in 9a88559
And IMO the other cases are out of scope for this PR and we should handle it in another issue if needed.
| lastMessageTextFromReport = getPolicyChangeMessage(lastReportAction); | ||
| } else if (isActionOfType(lastReportAction, CONST.REPORT.ACTIONS.TYPE.TRAVEL_UPDATE)) { | ||
| lastMessageTextFromReport = getTravelUpdateMessage(lastReportAction); | ||
| } else if (isRoomChangeLogAction(lastReportAction)) { |
There was a problem hiding this comment.
Can you take a look at this method? I think it's ideal to have same logic with LHN messages
App/src/libs/ReportActionsUtils.ts
Line 379 in 4668539
There was a problem hiding this comment.
There was a problem hiding this comment.
What would be the possible BE bug?
- Incorrect message when removing a member of a WS room?
- Missing message when adding someone to a WS room?
- both?
I'm not familiar with these message, so I'll need to investigate
There was a problem hiding this comment.
@aldo-expensify There's 2 bugs:
- When removing a member, BE sends incorrect
actionNamefor report action. - When adding a member, BE doesn't send any report actions a.k.a. no messages displayed.
There was a problem hiding this comment.
Friendly bump @aldo-expensify, could you give an update on the above issue once you have a chance?
There was a problem hiding this comment.
@aldo-expensify There's 2 bugs:
- When removing a member, BE sends incorrect
actionNamefor report action.
Regarding this one, from looking in the backend, it appears to be by design that in some cases we send a POLICY_CHANGE_LOG.REMOVE_FROM_ROOM and sometimes we don't. I think I understand from the code in the backend that we only create this POLICY_CHANGE_LOG.REMOVE_FROM_ROOM if the account removed is not a member of the workspace.
@jasperhuangg could you help me with verifying if this is a bug since you worked on this here https://github.com/Expensify/Auth/pull/8642/files 🙏
- When adding a member, BE doesn't send any report actions a.k.a. no messages displayed.
Seems like the backend only logs inviting someone if:
- The room is not public, AND
- Visibility of the room is
restrictedOR the invitee is not a member of the workspace
We only comment in the room when we invite accounts who can't already join on their own free will (i.e. non workspace members in workspace visibility rooms)
Which case are you testing exactly?
There was a problem hiding this comment.
Yeah the conditions seems correct, I tested with members outside workspace and the message is shown now.
|
@daledah Can you please update the PR? Then I can review it again so we can move it forward. |
|
@daledah Friendly bump |
|
@eh2077 Sorry for the delay, I updated! |
Reviewer Checklist
Screenshots/Videos |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/aldo-expensify in version: 9.1.98-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.1.98-12 🚀
|












Explanation of Change
Fixed Issues
$ #65314
PROPOSAL: #65314 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2025-07-11.at.00.03.19.mov
Android: mWeb Chrome
Screen.Recording.2025-07-11.at.00.02.26.mov
iOS: Native
Screen.Recording.2025-07-11.at.00.03.29.mov
iOS: mWeb Safari
Screen.Recording.2025-07-11.at.00.03.42.mov
MacOS: Chrome / Safari
Screen.Recording.2025-07-11.at.00.04.00.mov
MacOS: Desktop
Screen.Recording.2025-07-11.at.00.04.18.mov