From 364a575ce94a677d359c869ffde5b5fdc9a92a38 Mon Sep 17 00:00:00 2001 From: Rajat Parashar Date: Fri, 2 May 2025 06:50:18 +0530 Subject: [PATCH 01/13] Change Invite whisper actions --- src/CONST.ts | 3 ++- src/languages/en.ts | 3 ++- src/languages/es.ts | 3 ++- src/pages/home/report/PureReportActionItem.tsx | 18 +++++++++++++----- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/CONST.ts b/src/CONST.ts index 861c767fa48e..1fc0d003d1d1 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -1401,7 +1401,8 @@ const CONST = { USER: 'CANCEL_REASON_USER', }, ACTIONABLE_MENTION_WHISPER_RESOLUTION: { - INVITE: 'invited', + INVITE_TO_CHAT: 'inviteToChat', + INVITE_TO_SUBMIT_EXPENSES: 'inviteToSubmitExpense', NOTHING: 'nothing', }, ACTIONABLE_TRACK_EXPENSE_WHISPER_RESOLUTION: { diff --git a/src/languages/en.ts b/src/languages/en.ts index fd7f8485d3bd..bffd15200f66 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -5512,7 +5512,8 @@ const translations = { levelThreeResult: 'Message removed from channel plus anonymous warning and message is reported for review.', }, actionableMentionWhisperOptions: { - invite: 'Invite them', + inviteToSubmitExpense: 'Invite to submit expenses', + inviteToChat: 'Invite to chat only', nothing: 'Do nothing', }, actionableMentionJoinWorkspaceOptions: { diff --git a/src/languages/es.ts b/src/languages/es.ts index c38844001c2b..93975592d2c4 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -6008,7 +6008,8 @@ const translations = { copied: '¡Copiado!', }, actionableMentionWhisperOptions: { - invite: 'Invitar', + inviteToSubmitExpense: 'Invitar a enviar gastos', + inviteToChat: 'Invitar solo a chatear', nothing: 'No hacer nada', }, actionableMentionJoinWorkspaceOptions: { diff --git a/src/pages/home/report/PureReportActionItem.tsx b/src/pages/home/report/PureReportActionItem.tsx index 19e65a5fa44f..7e5f88b57e22 100644 --- a/src/pages/home/report/PureReportActionItem.tsx +++ b/src/pages/home/report/PureReportActionItem.tsx @@ -745,15 +745,23 @@ function PureReportActionItem({ return [ { - text: 'actionableMentionWhisperOptions.invite', - key: `${action.reportActionID}-actionableMentionWhisper-${CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE}`, - onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE), - isPrimary: true, + text: 'actionableMentionWhisperOptions.inviteToSubmitExpense', + key: `${action.reportActionID}-actionableMentionWhisper-${CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE_TO_SUBMIT_EXPENSES}`, + onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE_TO_SUBMIT_EXPENSES), + isMediumSized: true, + }, + { + text: 'actionableMentionWhisperOptions.inviteToChat', + key: `${action.reportActionID}-actionableMentionWhisper-${CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE_TO_CHAT}`, + onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE_TO_CHAT), + isMediumSized: true, + }, { text: 'actionableMentionWhisperOptions.nothing', key: `${action.reportActionID}-actionableMentionWhisper-${CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.NOTHING}`, onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.NOTHING), + isMediumSized: true, }, ]; }, [ @@ -1143,7 +1151,7 @@ function PureReportActionItem({ {actionableItemButtons.length > 0 && ( )} From 62f9d46ca1629b99a0d64b321d88273966f0074f Mon Sep 17 00:00:00 2001 From: Rajat Parashar Date: Fri, 2 May 2025 14:38:18 +0530 Subject: [PATCH 02/13] Add actions for new Mention confirm whisper --- src/CONST.ts | 4 ++++ src/libs/ReportActionsUtils.ts | 5 +++++ src/pages/home/report/PureReportActionItem.tsx | 14 +++++++++++++- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/CONST.ts b/src/CONST.ts index 1fc0d003d1d1..ba64da916565 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -1237,6 +1237,7 @@ const CONST = { ACTIONABLE_ADD_PAYMENT_CARD: 'ACTIONABLEADDPAYMENTCARD', ACTIONABLE_JOIN_REQUEST: 'ACTIONABLEJOINREQUEST', ACTIONABLE_MENTION_WHISPER: 'ACTIONABLEMENTIONWHISPER', + ACTIONABLE_MENTION_CONFIRM_WHISPER: 'ACTIONABLEMENTIONCONFIMWHISPER', ACTIONABLE_REPORT_MENTION_WHISPER: 'ACTIONABLEREPORTMENTIONWHISPER', ACTIONABLE_TRACK_EXPENSE_WHISPER: 'ACTIONABLETRACKEXPENSEWHISPER', ADD_COMMENT: 'ADDCOMMENT', @@ -1405,6 +1406,9 @@ const CONST = { INVITE_TO_SUBMIT_EXPENSES: 'inviteToSubmitExpense', NOTHING: 'nothing', }, + ACTIONABLE_MENTION_WHISPER_CONFIRM_RESOLUTION: { + DONE: 'done', + }, ACTIONABLE_TRACK_EXPENSE_WHISPER_RESOLUTION: { NOTHING: 'nothing', }, diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index 22c34f6dd154..07ddcae14226 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -762,6 +762,10 @@ function isActionableMentionWhisper(reportAction: OnyxEntry): repo return isActionOfType(reportAction, CONST.REPORT.ACTIONS.TYPE.ACTIONABLE_MENTION_WHISPER); } +function isActionableMentionConfirmWhisper(reportAction: OnyxEntry): reportAction is ReportAction { + return isActionOfType(reportAction, CONST.REPORT.ACTIONS.TYPE.ACTIONABLE_MENTION_CONFIRM_WHISPER); +} + /** * Checks if a given report action corresponds to an actionable report mention whisper. * @param reportAction @@ -2409,6 +2413,7 @@ export { isActionableJoinRequest, isActionableJoinRequestPending, isActionableMentionWhisper, + isActionableMentionConfirmWhisper, isActionableReportMentionWhisper, isActionableTrackExpense, isConciergeCategoryOptions, diff --git a/src/pages/home/report/PureReportActionItem.tsx b/src/pages/home/report/PureReportActionItem.tsx index 7e5f88b57e22..1bad784257ea 100644 --- a/src/pages/home/report/PureReportActionItem.tsx +++ b/src/pages/home/report/PureReportActionItem.tsx @@ -87,6 +87,7 @@ import { getWorkspaceUpdateFieldMessage, isActionableAddPaymentCard, isActionableJoinRequest, + isActionableMentionConfirmWhisper, isActionableMentionWhisper, isActionableReportMentionWhisper, isActionableTrackExpense, @@ -424,7 +425,7 @@ function PureReportActionItem({ const prevDraftMessage = usePrevious(draftMessage); const isReportActionLinked = linkedReportActionID && action.reportActionID && linkedReportActionID === action.reportActionID; const [isReportActionActive, setIsReportActionActive] = useState(!!isReportActionLinked); - const isActionableWhisper = isActionableMentionWhisper(action) || isActionableTrackExpense(action) || isActionableReportMentionWhisper(action); + const isActionableWhisper = isActionableMentionWhisper(action) || isActionableMentionConfirmWhisper(action) || isActionableTrackExpense(action) || isActionableReportMentionWhisper(action); const highlightedBackgroundColorIfNeeded = useMemo( () => (isReportActionLinked ? StyleUtils.getBackgroundColorStyle(theme.messageHighlightBG) : {}), @@ -743,6 +744,17 @@ function PureReportActionItem({ ]; } + if (isActionableMentionConfirmWhisper(action)) { + return [ + { + text: 'common.buttonConfirm', + key: `${action.reportActionID}-actionableReportMentionConfirmWhisper-${CONST.REPORT.ACTIONABLE_MENTION_WHISPER_CONFIRM_RESOLUTION.DONE}`, + onPress: () => {}, + isPrimary: true, + } + ]; + } + return [ { text: 'actionableMentionWhisperOptions.inviteToSubmitExpense', From 533ae48ac1168c4243771285a76d16b5c602f40e Mon Sep 17 00:00:00 2001 From: Rajat Parashar Date: Fri, 16 May 2025 15:08:12 +0530 Subject: [PATCH 03/13] Update actionable mention whisper and confirm whisper --- src/CONST.ts | 6 +++--- .../ResolveActionableMentionWhisperParams.ts | 2 +- src/libs/ReportActionsUtils.ts | 8 +++++--- src/libs/actions/Report.ts | 11 +++++++++- .../home/report/PureReportActionItem.tsx | 20 +++++++++---------- src/types/onyx/OriginalMessage.ts | 13 ++++++++++++ src/types/onyx/ReportAction.ts | 6 +++++- 7 files changed, 47 insertions(+), 19 deletions(-) diff --git a/src/CONST.ts b/src/CONST.ts index 45e4ee1f6705..2935cc18b665 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -1249,7 +1249,7 @@ const CONST = { ACTIONABLE_ADD_PAYMENT_CARD: 'ACTIONABLEADDPAYMENTCARD', ACTIONABLE_JOIN_REQUEST: 'ACTIONABLEJOINREQUEST', ACTIONABLE_MENTION_WHISPER: 'ACTIONABLEMENTIONWHISPER', - ACTIONABLE_MENTION_CONFIRM_WHISPER: 'ACTIONABLEMENTIONCONFIMWHISPER', + ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSES_CONFIRM_WHISPER: 'ACTIONABLEMENTIONINVITETOSUBMITEXPENSESCONFIRMWHISPER', ACTIONABLE_REPORT_MENTION_WHISPER: 'ACTIONABLEREPORTMENTIONWHISPER', ACTIONABLE_TRACK_EXPENSE_WHISPER: 'ACTIONABLETRACKEXPENSEWHISPER', ADD_COMMENT: 'ADDCOMMENT', @@ -1416,11 +1416,11 @@ const CONST = { USER: 'CANCEL_REASON_USER', }, ACTIONABLE_MENTION_WHISPER_RESOLUTION: { - INVITE_TO_CHAT: 'inviteToChat', + INVITE: 'invited', INVITE_TO_SUBMIT_EXPENSES: 'inviteToSubmitExpense', NOTHING: 'nothing', }, - ACTIONABLE_MENTION_WHISPER_CONFIRM_RESOLUTION: { + ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSES_CONFIRM_WHISPER: { DONE: 'done', }, ACTIONABLE_TRACK_EXPENSE_WHISPER_RESOLUTION: { diff --git a/src/libs/API/parameters/ResolveActionableMentionWhisperParams.ts b/src/libs/API/parameters/ResolveActionableMentionWhisperParams.ts index 87dfc934eb5f..d30a93777053 100644 --- a/src/libs/API/parameters/ResolveActionableMentionWhisperParams.ts +++ b/src/libs/API/parameters/ResolveActionableMentionWhisperParams.ts @@ -3,7 +3,7 @@ import type CONST from '@src/CONST'; type ResolveActionableMentionWhisperParams = { reportActionID: string; - resolution: ValueOf; + resolution: ValueOf | ValueOf; }; export default ResolveActionableMentionWhisperParams; diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index 9a3d993f1cea..2c7f25020f1c 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -770,8 +770,10 @@ function isActionableMentionWhisper(reportAction: OnyxEntry): repo return isActionOfType(reportAction, CONST.REPORT.ACTIONS.TYPE.ACTIONABLE_MENTION_WHISPER); } -function isActionableMentionConfirmWhisper(reportAction: OnyxEntry): reportAction is ReportAction { - return isActionOfType(reportAction, CONST.REPORT.ACTIONS.TYPE.ACTIONABLE_MENTION_CONFIRM_WHISPER); +function isActionableMentionInviteToSubmitExpensesConfirmWhisper( + reportAction: OnyxEntry, +): reportAction is ReportAction { + return isActionOfType(reportAction, CONST.REPORT.ACTIONS.TYPE.ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSES_CONFIRM_WHISPER); } /** @@ -2467,7 +2469,7 @@ export { isActionableJoinRequest, isActionableJoinRequestPending, isActionableMentionWhisper, - isActionableMentionConfirmWhisper, + isActionableMentionInviteToSubmitExpensesConfirmWhisper, isActionableReportMentionWhisper, isActionableTrackExpense, isConciergeCategoryOptions, diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index afa7148ba752..77ac0925d226 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -4215,7 +4215,7 @@ function clearNewRoomFormError() { function resolveActionableMentionWhisper( reportID: string | undefined, reportAction: OnyxEntry, - resolution: ValueOf, + resolution: ValueOf | ValueOf, ) { const message = ReportActionsUtils.getReportActionMessage(reportAction); if (!message || !reportAction || !reportID) { @@ -4292,6 +4292,14 @@ function resolveActionableMentionWhisper( API.write(WRITE_COMMANDS.RESOLVE_ACTIONABLE_MENTION_WHISPER, parameters, {optimisticData, failureData}); } +function resolveActionableMentionConfirmWhisper( + reportID: string | undefined, + reportAction: OnyxEntry, + resolution: ValueOf, +) { + resolveActionableMentionWhisper(reportID, reportAction, resolution); +} + function resolveActionableReportMentionWhisper( reportId: string | undefined, reportAction: OnyxEntry, @@ -5288,6 +5296,7 @@ export { removeFromGroupChat, removeFromRoom, resolveActionableMentionWhisper, + resolveActionableMentionConfirmWhisper, resolveActionableReportMentionWhisper, savePrivateNotesDraft, saveReportActionDraft, diff --git a/src/pages/home/report/PureReportActionItem.tsx b/src/pages/home/report/PureReportActionItem.tsx index 054487f2629b..88c1ac7f6b2f 100644 --- a/src/pages/home/report/PureReportActionItem.tsx +++ b/src/pages/home/report/PureReportActionItem.tsx @@ -87,7 +87,7 @@ import { getWorkspaceUpdateFieldMessage, isActionableAddPaymentCard, isActionableJoinRequest, - isActionableMentionConfirmWhisper, + isActionableMentionInviteToSubmitExpensesConfirmWhisper, isActionableMentionWhisper, isActionableReportMentionWhisper, isActionableTrackExpense, @@ -151,7 +151,7 @@ import variables from '@styles/variables'; import {openPersonalBankAccountSetupView} from '@userActions/BankAccounts'; import {hideEmojiPicker, isActive} from '@userActions/EmojiPickerAction'; import {acceptJoinRequest, declineJoinRequest} from '@userActions/Policy/Member'; -import {addComment, expandURLPreview} from '@userActions/Report'; +import {addComment, expandURLPreview, resolveActionableMentionConfirmWhisper} from '@userActions/Report'; import type {IgnoreDirection} from '@userActions/ReportActions'; import {isAnonymousUser, signOutAndRedirectToSignIn} from '@userActions/Session'; import {isBlockedFromConcierge} from '@userActions/User'; @@ -427,7 +427,8 @@ function PureReportActionItem({ const prevDraftMessage = usePrevious(draftMessage); const isReportActionLinked = linkedReportActionID && action.reportActionID && linkedReportActionID === action.reportActionID; const [isReportActionActive, setIsReportActionActive] = useState(!!isReportActionLinked); - const isActionableWhisper = isActionableMentionWhisper(action) || isActionableMentionConfirmWhisper(action) || isActionableTrackExpense(action) || isActionableReportMentionWhisper(action); + const isActionableWhisper = + isActionableMentionWhisper(action) || isActionableMentionInviteToSubmitExpensesConfirmWhisper(action) || isActionableTrackExpense(action) || isActionableReportMentionWhisper(action); const highlightedBackgroundColorIfNeeded = useMemo( () => (isReportActionLinked ? StyleUtils.getBackgroundColorStyle(theme.messageHighlightBG) : {}), @@ -749,14 +750,14 @@ function PureReportActionItem({ ]; } - if (isActionableMentionConfirmWhisper(action)) { + if (isActionableMentionInviteToSubmitExpensesConfirmWhisper(action)) { return [ { text: 'common.buttonConfirm', - key: `${action.reportActionID}-actionableReportMentionConfirmWhisper-${CONST.REPORT.ACTIONABLE_MENTION_WHISPER_CONFIRM_RESOLUTION.DONE}`, - onPress: () => {}, + key: `${action.reportActionID}-actionableReportMentionConfirmWhisper-${CONST.REPORT.ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSES_CONFIRM_WHISPER.DONE}`, + onPress: () => resolveActionableMentionConfirmWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSES_CONFIRM_WHISPER.DONE), isPrimary: true, - } + }, ]; } @@ -769,10 +770,9 @@ function PureReportActionItem({ }, { text: 'actionableMentionWhisperOptions.inviteToChat', - key: `${action.reportActionID}-actionableMentionWhisper-${CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE_TO_CHAT}`, - onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE_TO_CHAT), + key: `${action.reportActionID}-actionableMentionWhisper-${CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE}`, + onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE), isMediumSized: true, - }, { text: 'actionableMentionWhisperOptions.nothing', diff --git a/src/types/onyx/OriginalMessage.ts b/src/types/onyx/OriginalMessage.ts index 223a5ef47453..c84a759e83c0 100644 --- a/src/types/onyx/OriginalMessage.ts +++ b/src/types/onyx/OriginalMessage.ts @@ -125,6 +125,18 @@ type OriginalMessageActionableMentionWhisper = { whisperedTo?: number[]; }; +/** Model of `actionable mention whisper` report action */ +type OriginalMessageActionableMentionInviteToSubmitExpensesWhisper = { + /** Account IDs of users that aren't members of the room */ + inviteeAccountIDs: number[]; + + /** Decision on whether to invite users that were mentioned but aren't members or do nothing */ + resolution?: ValueOf | null; + + /** Collection of accountIDs of users mentioned in message */ + whisperedTo?: number[]; +}; + /** Model of `actionable report mention whisper` report action */ type OriginalMessageActionableReportMentionWhisper = { /** Decision on whether to create a report that were mentioned but doesn't exist or do nothing */ @@ -760,6 +772,7 @@ type OriginalMessageMap = { [CONST.REPORT.ACTIONS.TYPE.ACTIONABLE_ADD_PAYMENT_CARD]: OriginalMessageAddPaymentCard; [CONST.REPORT.ACTIONS.TYPE.ACTIONABLE_JOIN_REQUEST]: OriginalMessageJoinPolicy; [CONST.REPORT.ACTIONS.TYPE.ACTIONABLE_MENTION_WHISPER]: OriginalMessageActionableMentionWhisper; + [CONST.REPORT.ACTIONS.TYPE.ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSES_CONFIRM_WHISPER]: OriginalMessageActionableMentionInviteToSubmitExpensesWhisper; [CONST.REPORT.ACTIONS.TYPE.ACTIONABLE_REPORT_MENTION_WHISPER]: OriginalMessageActionableReportMentionWhisper; [CONST.REPORT.ACTIONS.TYPE.ACTIONABLE_TRACK_EXPENSE_WHISPER]: OriginalMessageActionableTrackedExpenseWhisper; [CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT]: OriginalMessageAddComment; diff --git a/src/types/onyx/ReportAction.ts b/src/types/onyx/ReportAction.ts index 5667284fdba1..f1685b5e963c 100644 --- a/src/types/onyx/ReportAction.ts +++ b/src/types/onyx/ReportAction.ts @@ -76,7 +76,11 @@ type Message = { currency?: string; /** resolution for actionable mention whisper */ - resolution?: ValueOf | ValueOf | null; + resolution?: + | ValueOf + | ValueOf + | ValueOf + | null; /** The time this report action was deleted */ deleted?: string; From ac9d3ac07f9cfe1d10764c240f651dce7466eb6f Mon Sep 17 00:00:00 2001 From: Rajat Parashar Date: Sat, 17 May 2025 22:31:31 +0530 Subject: [PATCH 04/13] Add invite logic to mention whisper --- src/CONST.ts | 2 +- src/libs/actions/Report.ts | 36 ++++++++++++++++--- .../home/report/PureReportActionItem.tsx | 10 +++--- src/types/onyx/OriginalMessage.ts | 3 ++ 4 files changed, 42 insertions(+), 9 deletions(-) diff --git a/src/CONST.ts b/src/CONST.ts index 2935cc18b665..805170dde02a 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -1417,7 +1417,7 @@ const CONST = { }, ACTIONABLE_MENTION_WHISPER_RESOLUTION: { INVITE: 'invited', - INVITE_TO_SUBMIT_EXPENSES: 'inviteToSubmitExpense', + INVITE_TO_SUBMIT_EXPENSE: 'inviteToSubmitExpense', NOTHING: 'nothing', }, ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSES_CONFIRM_WHISPER: { diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index 77ac0925d226..3c91bc2e87cb 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -88,7 +88,7 @@ import {rand64} from '@libs/NumberUtils'; import Parser from '@libs/Parser'; import * as PersonalDetailsUtils from '@libs/PersonalDetailsUtils'; import * as PhoneNumber from '@libs/PhoneNumber'; -import {extractPolicyIDFromPath, getDefaultApprover, getPolicy, isPolicyAdmin as isPolicyAdminPolicyUtils, isPolicyMember} from '@libs/PolicyUtils'; +import {extractPolicyIDFromPath, getDefaultApprover, getMemberAccountIDsForWorkspace, getPolicy, isPolicyAdmin as isPolicyAdminPolicyUtils, isPolicyMember} from '@libs/PolicyUtils'; import processReportIDDeeplink from '@libs/processReportIDDeeplink'; import Pusher from '@libs/Pusher'; import type {UserIsLeavingRoomEvent, UserIsTypingEvent} from '@libs/Pusher/types'; @@ -179,12 +179,13 @@ import type {Decision} from '@src/types/onyx/OriginalMessage'; import type {ConnectionName} from '@src/types/onyx/Policy'; import type {NotificationPreference, Participants, Participant as ReportParticipant, RoomVisibility, WriteCapability} from '@src/types/onyx/Report'; import type {Message, ReportActions} from '@src/types/onyx/ReportAction'; +import ReportActionName from '@src/types/onyx/ReportActionName'; import {isEmptyObject} from '@src/types/utils/EmptyObject'; import {clearByKey} from './CachedPDFPaths'; import {setDownload} from './Download'; import {close} from './Modal'; import navigateFromNotification from './navigateFromNotification'; -import {buildRoomMembersOnyxData} from './Policy/Member'; +import {addMembersToWorkspace, buildRoomMembersOnyxData} from './Policy/Member'; import {createPolicyExpenseChats} from './Policy/Policy'; import { createUpdateCommentMatcher, @@ -4216,9 +4217,36 @@ function resolveActionableMentionWhisper( reportID: string | undefined, reportAction: OnyxEntry, resolution: ValueOf | ValueOf, + policyID: string | undefined, ) { + if (!reportAction || !reportID) { + return; + } + + if (ReportActionsUtils.isActionableMentionWhisper(reportAction) && resolution === CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE_TO_SUBMIT_EXPENSE) { + const actionOriginalMessage = ReportActionsUtils.getOriginalMessage(reportAction); + + const policy = getPolicy(policyID); + + if (actionOriginalMessage && policyID) { + const currentUserDetails = allPersonalDetails?.[getCurrentUserAccountID()]; + const welcomeNoteSubject = `# ${currentUserDetails?.displayName ?? ''} invited you to ${policy?.name ?? 'a workspace'}`; + const welcomeNote = Localize.translateLocal('workspace.common.welcomeNote'); + const policyMemberAccountIDs = Object.values(getMemberAccountIDsForWorkspace(policy?.employeeList, false, false)); + addMembersToWorkspace( + { + [`${actionOriginalMessage.inviteeEmails?.at(0)}`]: actionOriginalMessage.inviteeAccountIDs?.at(0) ?? CONST.DEFAULT_NUMBER_ID, + }, + `${welcomeNoteSubject}\n\n${welcomeNote}`, + policyID, + policyMemberAccountIDs, + CONST.POLICY.ROLE.USER, + ); + } + } + const message = ReportActionsUtils.getReportActionMessage(reportAction); - if (!message || !reportAction || !reportID) { + if (!message) { return; } @@ -4297,7 +4325,7 @@ function resolveActionableMentionConfirmWhisper( reportAction: OnyxEntry, resolution: ValueOf, ) { - resolveActionableMentionWhisper(reportID, reportAction, resolution); + resolveActionableMentionWhisper(reportID, reportAction, resolution, undefined); } function resolveActionableReportMentionWhisper( diff --git a/src/pages/home/report/PureReportActionItem.tsx b/src/pages/home/report/PureReportActionItem.tsx index 88c1ac7f6b2f..c3872d49eda1 100644 --- a/src/pages/home/report/PureReportActionItem.tsx +++ b/src/pages/home/report/PureReportActionItem.tsx @@ -304,6 +304,7 @@ type PureReportActionItemProps = { reportId: string | undefined, reportAction: OnyxEntry, resolution: ValueOf, + policyId: string | undefined, ) => void; /** Whether the provided report is a closed expense report with no expenses */ @@ -764,26 +765,27 @@ function PureReportActionItem({ return [ { text: 'actionableMentionWhisperOptions.inviteToSubmitExpense', - key: `${action.reportActionID}-actionableMentionWhisper-${CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE_TO_SUBMIT_EXPENSES}`, - onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE_TO_SUBMIT_EXPENSES), + key: `${action.reportActionID}-actionableMentionWhisper-${CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE_TO_SUBMIT_EXPENSE}`, + onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE_TO_SUBMIT_EXPENSE, report?.policyID), isMediumSized: true, }, { text: 'actionableMentionWhisperOptions.inviteToChat', key: `${action.reportActionID}-actionableMentionWhisper-${CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE}`, - onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE), + onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE, report?.policyID), isMediumSized: true, }, { text: 'actionableMentionWhisperOptions.nothing', key: `${action.reportActionID}-actionableMentionWhisper-${CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.NOTHING}`, - onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.NOTHING), + onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.NOTHING, report?.policyID), isMediumSized: true, }, ]; }, [ action, isActionableWhisper, + report, reportID, userBillingFundID, createDraftTransactionAndNavigateToParticipantSelector, diff --git a/src/types/onyx/OriginalMessage.ts b/src/types/onyx/OriginalMessage.ts index c84a759e83c0..0bca90653a40 100644 --- a/src/types/onyx/OriginalMessage.ts +++ b/src/types/onyx/OriginalMessage.ts @@ -115,6 +115,9 @@ type OriginalMessageAddComment = { /** Model of `actionable mention whisper` report action */ type OriginalMessageActionableMentionWhisper = { + /** Account IDs of users that aren't members of the room */ + inviteeEmails: string[]; + /** Account IDs of users that aren't members of the room */ inviteeAccountIDs: number[]; From 5664f2c4c6753544518df3e765838fa46e749687 Mon Sep 17 00:00:00 2001 From: Rajat Parashar Date: Sat, 17 May 2025 22:33:52 +0530 Subject: [PATCH 05/13] remove extra import --- src/libs/actions/Report.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index 3c91bc2e87cb..6029ae90ecff 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -179,7 +179,6 @@ import type {Decision} from '@src/types/onyx/OriginalMessage'; import type {ConnectionName} from '@src/types/onyx/Policy'; import type {NotificationPreference, Participants, Participant as ReportParticipant, RoomVisibility, WriteCapability} from '@src/types/onyx/Report'; import type {Message, ReportActions} from '@src/types/onyx/ReportAction'; -import ReportActionName from '@src/types/onyx/ReportActionName'; import {isEmptyObject} from '@src/types/utils/EmptyObject'; import {clearByKey} from './CachedPDFPaths'; import {setDownload} from './Download'; From 1c85d664327543d62fd4493a455a792510772485 Mon Sep 17 00:00:00 2001 From: Rajat Parashar Date: Sat, 17 May 2025 22:36:49 +0530 Subject: [PATCH 06/13] fix comment --- src/types/onyx/OriginalMessage.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/onyx/OriginalMessage.ts b/src/types/onyx/OriginalMessage.ts index 0bca90653a40..1449f2ca8142 100644 --- a/src/types/onyx/OriginalMessage.ts +++ b/src/types/onyx/OriginalMessage.ts @@ -115,7 +115,7 @@ type OriginalMessageAddComment = { /** Model of `actionable mention whisper` report action */ type OriginalMessageActionableMentionWhisper = { - /** Account IDs of users that aren't members of the room */ + /** Emails of users that aren't members of the room */ inviteeEmails: string[]; /** Account IDs of users that aren't members of the room */ From 1602b39292ece738d4a4423774b7d0ad70d5412b Mon Sep 17 00:00:00 2001 From: Rajat Parashar Date: Sat, 17 May 2025 23:01:09 +0530 Subject: [PATCH 07/13] Fix lint issues --- src/pages/home/report/PureReportActionItem.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/home/report/PureReportActionItem.tsx b/src/pages/home/report/PureReportActionItem.tsx index c3872d49eda1..b817083f055b 100644 --- a/src/pages/home/report/PureReportActionItem.tsx +++ b/src/pages/home/report/PureReportActionItem.tsx @@ -772,13 +772,13 @@ function PureReportActionItem({ { text: 'actionableMentionWhisperOptions.inviteToChat', key: `${action.reportActionID}-actionableMentionWhisper-${CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE}`, - onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE, report?.policyID), + onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE, report?.policyID), isMediumSized: true, }, { text: 'actionableMentionWhisperOptions.nothing', key: `${action.reportActionID}-actionableMentionWhisper-${CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.NOTHING}`, - onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.NOTHING, report?.policyID), + onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.NOTHING, report?.policyID), isMediumSized: true, }, ]; From 2cb4f5b853355b945176a2f6bda2ea173fdabeb2 Mon Sep 17 00:00:00 2001 From: Rajat Parashar Date: Sat, 17 May 2025 23:40:56 +0530 Subject: [PATCH 08/13] Rename --- src/CONST.ts | 4 ++-- .../ResolveActionableMentionWhisperParams.ts | 2 +- src/libs/ReportActionsUtils.ts | 8 ++++---- src/libs/actions/Report.ts | 4 ++-- src/pages/home/report/PureReportActionItem.tsx | 10 +++++----- src/types/onyx/OriginalMessage.ts | 6 +++--- src/types/onyx/ReportAction.ts | 2 +- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/CONST.ts b/src/CONST.ts index 805170dde02a..8a5d59f17290 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -1249,7 +1249,7 @@ const CONST = { ACTIONABLE_ADD_PAYMENT_CARD: 'ACTIONABLEADDPAYMENTCARD', ACTIONABLE_JOIN_REQUEST: 'ACTIONABLEJOINREQUEST', ACTIONABLE_MENTION_WHISPER: 'ACTIONABLEMENTIONWHISPER', - ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSES_CONFIRM_WHISPER: 'ACTIONABLEMENTIONINVITETOSUBMITEXPENSESCONFIRMWHISPER', + ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSE_CONFIRM_WHISPER: 'ACTIONABLEMENTIONINVITETOSUBMITEXPENSECONFIRMWHISPER', ACTIONABLE_REPORT_MENTION_WHISPER: 'ACTIONABLEREPORTMENTIONWHISPER', ACTIONABLE_TRACK_EXPENSE_WHISPER: 'ACTIONABLETRACKEXPENSEWHISPER', ADD_COMMENT: 'ADDCOMMENT', @@ -1420,7 +1420,7 @@ const CONST = { INVITE_TO_SUBMIT_EXPENSE: 'inviteToSubmitExpense', NOTHING: 'nothing', }, - ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSES_CONFIRM_WHISPER: { + ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSE_CONFIRM_WHISPER: { DONE: 'done', }, ACTIONABLE_TRACK_EXPENSE_WHISPER_RESOLUTION: { diff --git a/src/libs/API/parameters/ResolveActionableMentionWhisperParams.ts b/src/libs/API/parameters/ResolveActionableMentionWhisperParams.ts index d30a93777053..3b6b05910a5b 100644 --- a/src/libs/API/parameters/ResolveActionableMentionWhisperParams.ts +++ b/src/libs/API/parameters/ResolveActionableMentionWhisperParams.ts @@ -3,7 +3,7 @@ import type CONST from '@src/CONST'; type ResolveActionableMentionWhisperParams = { reportActionID: string; - resolution: ValueOf | ValueOf; + resolution: ValueOf | ValueOf; }; export default ResolveActionableMentionWhisperParams; diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index 2c7f25020f1c..7ecba5d5b056 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -770,10 +770,10 @@ function isActionableMentionWhisper(reportAction: OnyxEntry): repo return isActionOfType(reportAction, CONST.REPORT.ACTIONS.TYPE.ACTIONABLE_MENTION_WHISPER); } -function isActionableMentionInviteToSubmitExpensesConfirmWhisper( +function isActionableMentionInviteToSubmitExpenseConfirmWhisper( reportAction: OnyxEntry, -): reportAction is ReportAction { - return isActionOfType(reportAction, CONST.REPORT.ACTIONS.TYPE.ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSES_CONFIRM_WHISPER); +): reportAction is ReportAction { + return isActionOfType(reportAction, CONST.REPORT.ACTIONS.TYPE.ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSE_CONFIRM_WHISPER); } /** @@ -2469,7 +2469,7 @@ export { isActionableJoinRequest, isActionableJoinRequestPending, isActionableMentionWhisper, - isActionableMentionInviteToSubmitExpensesConfirmWhisper, + isActionableMentionInviteToSubmitExpenseConfirmWhisper, isActionableReportMentionWhisper, isActionableTrackExpense, isConciergeCategoryOptions, diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index 6029ae90ecff..d9955350582e 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -4215,7 +4215,7 @@ function clearNewRoomFormError() { function resolveActionableMentionWhisper( reportID: string | undefined, reportAction: OnyxEntry, - resolution: ValueOf | ValueOf, + resolution: ValueOf | ValueOf, policyID: string | undefined, ) { if (!reportAction || !reportID) { @@ -4322,7 +4322,7 @@ function resolveActionableMentionWhisper( function resolveActionableMentionConfirmWhisper( reportID: string | undefined, reportAction: OnyxEntry, - resolution: ValueOf, + resolution: ValueOf, ) { resolveActionableMentionWhisper(reportID, reportAction, resolution, undefined); } diff --git a/src/pages/home/report/PureReportActionItem.tsx b/src/pages/home/report/PureReportActionItem.tsx index b817083f055b..635d7ebac181 100644 --- a/src/pages/home/report/PureReportActionItem.tsx +++ b/src/pages/home/report/PureReportActionItem.tsx @@ -87,7 +87,7 @@ import { getWorkspaceUpdateFieldMessage, isActionableAddPaymentCard, isActionableJoinRequest, - isActionableMentionInviteToSubmitExpensesConfirmWhisper, + isActionableMentionInviteToSubmitExpenseConfirmWhisper, isActionableMentionWhisper, isActionableReportMentionWhisper, isActionableTrackExpense, @@ -429,7 +429,7 @@ function PureReportActionItem({ const isReportActionLinked = linkedReportActionID && action.reportActionID && linkedReportActionID === action.reportActionID; const [isReportActionActive, setIsReportActionActive] = useState(!!isReportActionLinked); const isActionableWhisper = - isActionableMentionWhisper(action) || isActionableMentionInviteToSubmitExpensesConfirmWhisper(action) || isActionableTrackExpense(action) || isActionableReportMentionWhisper(action); + isActionableMentionWhisper(action) || isActionableMentionInviteToSubmitExpenseConfirmWhisper(action) || isActionableTrackExpense(action) || isActionableReportMentionWhisper(action); const highlightedBackgroundColorIfNeeded = useMemo( () => (isReportActionLinked ? StyleUtils.getBackgroundColorStyle(theme.messageHighlightBG) : {}), @@ -751,12 +751,12 @@ function PureReportActionItem({ ]; } - if (isActionableMentionInviteToSubmitExpensesConfirmWhisper(action)) { + if (isActionableMentionInviteToSubmitExpenseConfirmWhisper(action)) { return [ { text: 'common.buttonConfirm', - key: `${action.reportActionID}-actionableReportMentionConfirmWhisper-${CONST.REPORT.ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSES_CONFIRM_WHISPER.DONE}`, - onPress: () => resolveActionableMentionConfirmWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSES_CONFIRM_WHISPER.DONE), + key: `${action.reportActionID}-actionableReportMentionConfirmWhisper-${CONST.REPORT.ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSE_CONFIRM_WHISPER.DONE}`, + onPress: () => resolveActionableMentionConfirmWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSE_CONFIRM_WHISPER.DONE), isPrimary: true, }, ]; diff --git a/src/types/onyx/OriginalMessage.ts b/src/types/onyx/OriginalMessage.ts index 1449f2ca8142..c175e3f8ba87 100644 --- a/src/types/onyx/OriginalMessage.ts +++ b/src/types/onyx/OriginalMessage.ts @@ -129,12 +129,12 @@ type OriginalMessageActionableMentionWhisper = { }; /** Model of `actionable mention whisper` report action */ -type OriginalMessageActionableMentionInviteToSubmitExpensesWhisper = { +type OriginalMessageActionableMentionInviteToSubmitExpenseConfirmWhisper = { /** Account IDs of users that aren't members of the room */ inviteeAccountIDs: number[]; /** Decision on whether to invite users that were mentioned but aren't members or do nothing */ - resolution?: ValueOf | null; + resolution?: ValueOf | null; /** Collection of accountIDs of users mentioned in message */ whisperedTo?: number[]; @@ -775,7 +775,7 @@ type OriginalMessageMap = { [CONST.REPORT.ACTIONS.TYPE.ACTIONABLE_ADD_PAYMENT_CARD]: OriginalMessageAddPaymentCard; [CONST.REPORT.ACTIONS.TYPE.ACTIONABLE_JOIN_REQUEST]: OriginalMessageJoinPolicy; [CONST.REPORT.ACTIONS.TYPE.ACTIONABLE_MENTION_WHISPER]: OriginalMessageActionableMentionWhisper; - [CONST.REPORT.ACTIONS.TYPE.ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSES_CONFIRM_WHISPER]: OriginalMessageActionableMentionInviteToSubmitExpensesWhisper; + [CONST.REPORT.ACTIONS.TYPE.ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSE_CONFIRM_WHISPER]: OriginalMessageActionableMentionInviteToSubmitExpenseConfirmWhisper; [CONST.REPORT.ACTIONS.TYPE.ACTIONABLE_REPORT_MENTION_WHISPER]: OriginalMessageActionableReportMentionWhisper; [CONST.REPORT.ACTIONS.TYPE.ACTIONABLE_TRACK_EXPENSE_WHISPER]: OriginalMessageActionableTrackedExpenseWhisper; [CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT]: OriginalMessageAddComment; diff --git a/src/types/onyx/ReportAction.ts b/src/types/onyx/ReportAction.ts index f1685b5e963c..339745e6291d 100644 --- a/src/types/onyx/ReportAction.ts +++ b/src/types/onyx/ReportAction.ts @@ -78,7 +78,7 @@ type Message = { /** resolution for actionable mention whisper */ resolution?: | ValueOf - | ValueOf + | ValueOf | ValueOf | null; From 21788528b8a18fd4ff11a3a23ba75e5c60956a75 Mon Sep 17 00:00:00 2001 From: Rajat Parashar Date: Fri, 20 Jun 2025 12:50:39 +0530 Subject: [PATCH 09/13] Remove deprecated --- src/libs/actions/Report.ts | 6 +++--- src/pages/home/report/PureReportActionItem.tsx | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index f250c81056d1..be3ed8bdc521 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -4314,7 +4314,7 @@ function resolveActionableMentionWhisper( reportID: string | undefined, reportAction: OnyxEntry, resolution: ValueOf | ValueOf, - policyID: string | undefined, + policy?: OnyxEntry, ) { if (!reportAction || !reportID) { return; @@ -4323,7 +4323,7 @@ function resolveActionableMentionWhisper( if (ReportActionsUtils.isActionableMentionWhisper(reportAction) && resolution === CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE_TO_SUBMIT_EXPENSE) { const actionOriginalMessage = ReportActionsUtils.getOriginalMessage(reportAction); - const policy = getPolicy(policyID); + const policyID = policy?.id; if (actionOriginalMessage && policyID) { const currentUserDetails = allPersonalDetails?.[getCurrentUserAccountID()]; @@ -4422,7 +4422,7 @@ function resolveActionableMentionConfirmWhisper( reportAction: OnyxEntry, resolution: ValueOf, ) { - resolveActionableMentionWhisper(reportID, reportAction, resolution, undefined); + resolveActionableMentionWhisper(reportID, reportAction, resolution); } function resolveActionableReportMentionWhisper( diff --git a/src/pages/home/report/PureReportActionItem.tsx b/src/pages/home/report/PureReportActionItem.tsx index 0aa55b5569a4..0774805e9a23 100644 --- a/src/pages/home/report/PureReportActionItem.tsx +++ b/src/pages/home/report/PureReportActionItem.tsx @@ -322,7 +322,7 @@ type PureReportActionItemProps = { reportId: string | undefined, reportAction: OnyxEntry, resolution: ValueOf, - policyId: string | undefined, + policy: OnyxEntry, ) => void; /** Whether the provided report is a closed expense report with no expenses */ @@ -817,34 +817,34 @@ function PureReportActionItem({ { text: 'actionableMentionWhisperOptions.inviteToSubmitExpense', key: `${action.reportActionID}-actionableMentionWhisper-${CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE_TO_SUBMIT_EXPENSE}`, - onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE_TO_SUBMIT_EXPENSE, report?.policyID), + onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE_TO_SUBMIT_EXPENSE, policy), isMediumSized: true, }, { text: 'actionableMentionWhisperOptions.inviteToChat', key: `${action.reportActionID}-actionableMentionWhisper-${CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE}`, - onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE, report?.policyID), + onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE, policy), isMediumSized: true, }, { text: 'actionableMentionWhisperOptions.nothing', key: `${action.reportActionID}-actionableMentionWhisper-${CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.NOTHING}`, - onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.NOTHING, report?.policyID), + onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.NOTHING, policy), isMediumSized: true, }, ]; }, [ action, + userBillingFundID, isActionableWhisper, - report, reportID, - userBillingFundID, + originalReportID, + isBetaEnabled, createDraftTransactionAndNavigateToParticipantSelector, dismissTrackExpenseActionableWhisper, resolveActionableReportMentionWhisper, resolveActionableMentionWhisper, - originalReportID, - isBetaEnabled, + policy, ]); /** From ce06778ff5921c897544d2f343cd285ba814a21b Mon Sep 17 00:00:00 2001 From: Rajat Parashar Date: Fri, 4 Jul 2025 00:28:35 +0530 Subject: [PATCH 10/13] Update actions for actionableMentionWhisper --- .../home/report/PureReportActionItem.tsx | 23 ++++++++++++++----- src/pages/home/report/ReportActionItem.tsx | 2 ++ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/pages/home/report/PureReportActionItem.tsx b/src/pages/home/report/PureReportActionItem.tsx index 9badcaa2426e..8a635bfa4faf 100644 --- a/src/pages/home/report/PureReportActionItem.tsx +++ b/src/pages/home/report/PureReportActionItem.tsx @@ -55,7 +55,7 @@ import {formatPhoneNumber} from '@libs/LocalePhoneNumber'; import Navigation from '@libs/Navigation/Navigation'; import Permissions from '@libs/Permissions'; import {getDisplayNameOrDefault} from '@libs/PersonalDetailsUtils'; -import {getCleanedTagName} from '@libs/PolicyUtils'; +import {getCleanedTagName, isPolicyAdmin, isPolicyOwner} from '@libs/PolicyUtils'; import { extractLinksFromMessageHtml, getAddedApprovalRuleMessage, @@ -358,6 +358,9 @@ type PureReportActionItemProps = { /** Whether to show border for MoneyRequestReportPreviewContent */ shouldShowBorder?: boolean; + + /** Current user's account id */ + currentUserAccountID?: number; }; // This is equivalent to returning a negative boolean in normal functions, but we can keep the element return type @@ -421,6 +424,7 @@ function PureReportActionItem({ userBillingFundID, policies, shouldShowBorder, + currentUserAccountID, }: PureReportActionItemProps) { const actionSheetAwareScrollViewContext = useContext(ActionSheetAwareScrollView.ActionSheetAwareScrollViewContext); const {translate, datetimeToCalendarTime} = useLocalize(); @@ -811,13 +815,18 @@ function PureReportActionItem({ ]; } - return [ - { + const actionableMentionWhisperOptions = []; + + if (isPolicyAdmin(policy) || isPolicyOwner(policy, currentUserAccountID)) { + actionableMentionWhisperOptions.push({ text: 'actionableMentionWhisperOptions.inviteToSubmitExpense', key: `${action.reportActionID}-actionableMentionWhisper-${CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE_TO_SUBMIT_EXPENSE}`, onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE_TO_SUBMIT_EXPENSE, policy), isMediumSized: true, - }, + }); + } + + actionableMentionWhisperOptions.push( { text: 'actionableMentionWhisperOptions.inviteToChat', key: `${action.reportActionID}-actionableMentionWhisper-${CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.INVITE}`, @@ -830,11 +839,14 @@ function PureReportActionItem({ onPress: () => resolveActionableMentionWhisper(reportID, action, CONST.REPORT.ACTIONABLE_MENTION_WHISPER_RESOLUTION.NOTHING, policy), isMediumSized: true, }, - ]; + ); + return actionableMentionWhisperOptions; }, [ action, userBillingFundID, isActionableWhisper, + policy, + currentUserAccountID, reportID, originalReportID, isBetaEnabled, @@ -842,7 +854,6 @@ function PureReportActionItem({ dismissTrackExpenseActionableWhisper, resolveActionableReportMentionWhisper, resolveActionableMentionWhisper, - policy, ]); /** diff --git a/src/pages/home/report/ReportActionItem.tsx b/src/pages/home/report/ReportActionItem.tsx index ed7a81bdcabf..f10b50a69e1d 100644 --- a/src/pages/home/report/ReportActionItem.tsx +++ b/src/pages/home/report/ReportActionItem.tsx @@ -50,6 +50,7 @@ function ReportActionItem({allReports, action, report, transactions, shouldShowD const originalReportID = useMemo(() => getOriginalReportID(reportID, action), [reportID, action]); const originalReport = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${originalReportID}`]; const isOriginalReportArchived = useReportIsArchived(originalReportID); + const [currentUserAccountID] = useOnyx(ONYXKEYS.SESSION, {canBeMissing: false, selector: (session) => session?.accountID}); const [draftMessage] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS_DRAFTS}${originalReportID}`, { canBeMissing: true, selector: (draftMessagesForReport) => { @@ -90,6 +91,7 @@ function ReportActionItem({allReports, action, report, transactions, shouldShowD action={action} report={report} policy={policy} + currentUserAccountID={currentUserAccountID} draftMessage={draftMessage} iouReport={iouReport} taskReport={taskReport} From 2ab2e4d48f136337c3e917f7930ec974c25a591d Mon Sep 17 00:00:00 2001 From: Rajat Parashar Date: Fri, 4 Jul 2025 00:41:51 +0530 Subject: [PATCH 11/13] All translations --- Mobile-Expensify | 2 +- src/languages/de.ts | 3 ++- src/languages/fr.ts | 3 ++- src/languages/it.ts | 5 +++-- src/languages/ja.ts | 3 ++- src/languages/nl.ts | 5 +++-- src/languages/pl.ts | 5 +++-- src/languages/pt-BR.ts | 3 ++- src/languages/zh-hans.ts | 5 +++-- 9 files changed, 21 insertions(+), 13 deletions(-) diff --git a/Mobile-Expensify b/Mobile-Expensify index aada1b6ccc3f..57d9657d93bd 160000 --- a/Mobile-Expensify +++ b/Mobile-Expensify @@ -1 +1 @@ -Subproject commit aada1b6ccc3f198db15bf882e7f962371b2dd181 +Subproject commit 57d9657d93bd5e104d5c6215bab163fd4340b8ad diff --git a/src/languages/de.ts b/src/languages/de.ts index 279ff2efdf3e..f11f958745d8 100644 --- a/src/languages/de.ts +++ b/src/languages/de.ts @@ -6248,7 +6248,8 @@ const translations = { levelThreeResult: 'Nachricht aus dem Kanal entfernt, anonyme Warnung gesendet und Nachricht zur Überprüfung gemeldet.', }, actionableMentionWhisperOptions: { - invite: 'Lade sie ein', + inviteToSubmitExpense: 'Zum Einreichen von Ausgaben einladen', + inviteToChat: 'Nur zum Chatten einladen', nothing: 'Nichts tun', }, actionableMentionJoinWorkspaceOptions: { diff --git a/src/languages/fr.ts b/src/languages/fr.ts index 67384733c9c5..e4876b7489a8 100644 --- a/src/languages/fr.ts +++ b/src/languages/fr.ts @@ -6257,7 +6257,8 @@ const translations = { levelThreeResult: 'Message supprimé du canal avec un avertissement anonyme et le message est signalé pour examen.', }, actionableMentionWhisperOptions: { - invite: 'Invitez-les', + inviteToSubmitExpense: 'Inviter à soumettre des dépenses', + inviteToChat: 'Inviter uniquement à discuter', nothing: 'Ne rien faire', }, actionableMentionJoinWorkspaceOptions: { diff --git a/src/languages/it.ts b/src/languages/it.ts index 82906b432e45..d06bfd1a3c6d 100644 --- a/src/languages/it.ts +++ b/src/languages/it.ts @@ -6261,8 +6261,9 @@ const translations = { levelThreeResult: 'Messaggio rimosso dal canale più avviso anonimo e messaggio segnalato per revisione.', }, actionableMentionWhisperOptions: { - invite: 'Invitali', - nothing: 'Do nothing', + inviteToSubmitExpense: 'Invita a inviare le spese', + inviteToChat: 'Invita solo a chattare', + nothing: 'Non fare nulla', }, actionableMentionJoinWorkspaceOptions: { accept: 'Accetta', diff --git a/src/languages/ja.ts b/src/languages/ja.ts index 80d4d4b5d8aa..35ae2b644bee 100644 --- a/src/languages/ja.ts +++ b/src/languages/ja.ts @@ -6221,7 +6221,8 @@ const translations = { levelThreeResult: 'チャンネルからメッセージが削除され、匿名の警告が行われ、メッセージがレビューのために報告されました。', }, actionableMentionWhisperOptions: { - invite: '招待する', + inviteToSubmitExpense: '経費の提出に招待する', + inviteToChat: 'チャットのみ招待', nothing: '何もしない', }, actionableMentionJoinWorkspaceOptions: { diff --git a/src/languages/nl.ts b/src/languages/nl.ts index 02c3e046c551..2da48e401e45 100644 --- a/src/languages/nl.ts +++ b/src/languages/nl.ts @@ -6253,8 +6253,9 @@ const translations = { levelThreeResult: 'Bericht verwijderd uit kanaal plus anonieme waarschuwing en bericht is gerapporteerd voor beoordeling.', }, actionableMentionWhisperOptions: { - invite: 'Nodig hen uit', - nothing: 'Do nothing', + inviteToSubmitExpense: 'Uitnodigen om onkosten in te dienen', + inviteToChat: 'Alleen uitnodigen om te chatten', + nothing: 'Niets doen', }, actionableMentionJoinWorkspaceOptions: { accept: 'Accepteren', diff --git a/src/languages/pl.ts b/src/languages/pl.ts index ea8bad34c374..bcc78f0313bc 100644 --- a/src/languages/pl.ts +++ b/src/languages/pl.ts @@ -6238,8 +6238,9 @@ const translations = { levelThreeResult: 'Wiadomość usunięta z kanału, dodano anonimowe ostrzeżenie, a wiadomość została zgłoszona do przeglądu.', }, actionableMentionWhisperOptions: { - invite: 'Zaproś ich', - nothing: 'Do nothing', + inviteToSubmitExpense: 'Zaproś do przesyłania wydatków', + inviteToChat: 'Zaproś tylko do czatu', + nothing: 'Nie rób nic', }, actionableMentionJoinWorkspaceOptions: { accept: 'Akceptuj', diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts index 512e58368c27..46f554d85806 100644 --- a/src/languages/pt-BR.ts +++ b/src/languages/pt-BR.ts @@ -6251,7 +6251,8 @@ const translations = { levelThreeResult: 'Mensagem removida do canal, além de um aviso anônimo, e a mensagem foi relatada para revisão.', }, actionableMentionWhisperOptions: { - invite: 'Convide-os', + inviteToSubmitExpense: 'Convidar para enviar despesas', + inviteToChat: 'Convidar apenas para conversar', nothing: 'Não faça nada', }, actionableMentionJoinWorkspaceOptions: { diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts index bb5ff6bbf7c0..7c6ef4d08aa7 100644 --- a/src/languages/zh-hans.ts +++ b/src/languages/zh-hans.ts @@ -6140,8 +6140,9 @@ const translations = { levelThreeResult: '消息已从频道中移除,并收到匿名警告,消息已提交审核。', }, actionableMentionWhisperOptions: { - invite: '邀请他们', - nothing: 'Do nothing', + inviteToSubmitExpense: '邀请提交费用', + inviteToChat: '仅邀请聊天', + nothing: '什么都不做', }, actionableMentionJoinWorkspaceOptions: { accept: '接受', From adb5fbb13424e736184365fd3be8304b98b00b7a Mon Sep 17 00:00:00 2001 From: Rajat Parashar Date: Fri, 4 Jul 2025 00:51:39 +0530 Subject: [PATCH 12/13] Revert "All translations" This reverts commit 2ab2e4d48f136337c3e917f7930ec974c25a591d. --- Mobile-Expensify | 2 +- src/languages/de.ts | 3 +-- src/languages/fr.ts | 3 +-- src/languages/it.ts | 5 ++--- src/languages/ja.ts | 3 +-- src/languages/nl.ts | 5 ++--- src/languages/pl.ts | 5 ++--- src/languages/pt-BR.ts | 3 +-- src/languages/zh-hans.ts | 5 ++--- 9 files changed, 13 insertions(+), 21 deletions(-) diff --git a/Mobile-Expensify b/Mobile-Expensify index 57d9657d93bd..aada1b6ccc3f 160000 --- a/Mobile-Expensify +++ b/Mobile-Expensify @@ -1 +1 @@ -Subproject commit 57d9657d93bd5e104d5c6215bab163fd4340b8ad +Subproject commit aada1b6ccc3f198db15bf882e7f962371b2dd181 diff --git a/src/languages/de.ts b/src/languages/de.ts index f11f958745d8..279ff2efdf3e 100644 --- a/src/languages/de.ts +++ b/src/languages/de.ts @@ -6248,8 +6248,7 @@ const translations = { levelThreeResult: 'Nachricht aus dem Kanal entfernt, anonyme Warnung gesendet und Nachricht zur Überprüfung gemeldet.', }, actionableMentionWhisperOptions: { - inviteToSubmitExpense: 'Zum Einreichen von Ausgaben einladen', - inviteToChat: 'Nur zum Chatten einladen', + invite: 'Lade sie ein', nothing: 'Nichts tun', }, actionableMentionJoinWorkspaceOptions: { diff --git a/src/languages/fr.ts b/src/languages/fr.ts index e4876b7489a8..67384733c9c5 100644 --- a/src/languages/fr.ts +++ b/src/languages/fr.ts @@ -6257,8 +6257,7 @@ const translations = { levelThreeResult: 'Message supprimé du canal avec un avertissement anonyme et le message est signalé pour examen.', }, actionableMentionWhisperOptions: { - inviteToSubmitExpense: 'Inviter à soumettre des dépenses', - inviteToChat: 'Inviter uniquement à discuter', + invite: 'Invitez-les', nothing: 'Ne rien faire', }, actionableMentionJoinWorkspaceOptions: { diff --git a/src/languages/it.ts b/src/languages/it.ts index d06bfd1a3c6d..82906b432e45 100644 --- a/src/languages/it.ts +++ b/src/languages/it.ts @@ -6261,9 +6261,8 @@ const translations = { levelThreeResult: 'Messaggio rimosso dal canale più avviso anonimo e messaggio segnalato per revisione.', }, actionableMentionWhisperOptions: { - inviteToSubmitExpense: 'Invita a inviare le spese', - inviteToChat: 'Invita solo a chattare', - nothing: 'Non fare nulla', + invite: 'Invitali', + nothing: 'Do nothing', }, actionableMentionJoinWorkspaceOptions: { accept: 'Accetta', diff --git a/src/languages/ja.ts b/src/languages/ja.ts index 35ae2b644bee..80d4d4b5d8aa 100644 --- a/src/languages/ja.ts +++ b/src/languages/ja.ts @@ -6221,8 +6221,7 @@ const translations = { levelThreeResult: 'チャンネルからメッセージが削除され、匿名の警告が行われ、メッセージがレビューのために報告されました。', }, actionableMentionWhisperOptions: { - inviteToSubmitExpense: '経費の提出に招待する', - inviteToChat: 'チャットのみ招待', + invite: '招待する', nothing: '何もしない', }, actionableMentionJoinWorkspaceOptions: { diff --git a/src/languages/nl.ts b/src/languages/nl.ts index 2da48e401e45..02c3e046c551 100644 --- a/src/languages/nl.ts +++ b/src/languages/nl.ts @@ -6253,9 +6253,8 @@ const translations = { levelThreeResult: 'Bericht verwijderd uit kanaal plus anonieme waarschuwing en bericht is gerapporteerd voor beoordeling.', }, actionableMentionWhisperOptions: { - inviteToSubmitExpense: 'Uitnodigen om onkosten in te dienen', - inviteToChat: 'Alleen uitnodigen om te chatten', - nothing: 'Niets doen', + invite: 'Nodig hen uit', + nothing: 'Do nothing', }, actionableMentionJoinWorkspaceOptions: { accept: 'Accepteren', diff --git a/src/languages/pl.ts b/src/languages/pl.ts index bcc78f0313bc..ea8bad34c374 100644 --- a/src/languages/pl.ts +++ b/src/languages/pl.ts @@ -6238,9 +6238,8 @@ const translations = { levelThreeResult: 'Wiadomość usunięta z kanału, dodano anonimowe ostrzeżenie, a wiadomość została zgłoszona do przeglądu.', }, actionableMentionWhisperOptions: { - inviteToSubmitExpense: 'Zaproś do przesyłania wydatków', - inviteToChat: 'Zaproś tylko do czatu', - nothing: 'Nie rób nic', + invite: 'Zaproś ich', + nothing: 'Do nothing', }, actionableMentionJoinWorkspaceOptions: { accept: 'Akceptuj', diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts index 46f554d85806..512e58368c27 100644 --- a/src/languages/pt-BR.ts +++ b/src/languages/pt-BR.ts @@ -6251,8 +6251,7 @@ const translations = { levelThreeResult: 'Mensagem removida do canal, além de um aviso anônimo, e a mensagem foi relatada para revisão.', }, actionableMentionWhisperOptions: { - inviteToSubmitExpense: 'Convidar para enviar despesas', - inviteToChat: 'Convidar apenas para conversar', + invite: 'Convide-os', nothing: 'Não faça nada', }, actionableMentionJoinWorkspaceOptions: { diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts index 7c6ef4d08aa7..bb5ff6bbf7c0 100644 --- a/src/languages/zh-hans.ts +++ b/src/languages/zh-hans.ts @@ -6140,9 +6140,8 @@ const translations = { levelThreeResult: '消息已从频道中移除,并收到匿名警告,消息已提交审核。', }, actionableMentionWhisperOptions: { - inviteToSubmitExpense: '邀请提交费用', - inviteToChat: '仅邀请聊天', - nothing: '什么都不做', + invite: '邀请他们', + nothing: 'Do nothing', }, actionableMentionJoinWorkspaceOptions: { accept: '接受', From 05ad9014aa049a8c0f4c0d4b342718488d7b20f0 Mon Sep 17 00:00:00 2001 From: Rajat Parashar Date: Fri, 4 Jul 2025 00:51:51 +0530 Subject: [PATCH 13/13] All translations --- src/languages/de.ts | 3 ++- src/languages/fr.ts | 3 ++- src/languages/it.ts | 5 +++-- src/languages/ja.ts | 3 ++- src/languages/nl.ts | 5 +++-- src/languages/pl.ts | 5 +++-- src/languages/pt-BR.ts | 3 ++- src/languages/zh-hans.ts | 5 +++-- 8 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/languages/de.ts b/src/languages/de.ts index 279ff2efdf3e..f11f958745d8 100644 --- a/src/languages/de.ts +++ b/src/languages/de.ts @@ -6248,7 +6248,8 @@ const translations = { levelThreeResult: 'Nachricht aus dem Kanal entfernt, anonyme Warnung gesendet und Nachricht zur Überprüfung gemeldet.', }, actionableMentionWhisperOptions: { - invite: 'Lade sie ein', + inviteToSubmitExpense: 'Zum Einreichen von Ausgaben einladen', + inviteToChat: 'Nur zum Chatten einladen', nothing: 'Nichts tun', }, actionableMentionJoinWorkspaceOptions: { diff --git a/src/languages/fr.ts b/src/languages/fr.ts index 67384733c9c5..e4876b7489a8 100644 --- a/src/languages/fr.ts +++ b/src/languages/fr.ts @@ -6257,7 +6257,8 @@ const translations = { levelThreeResult: 'Message supprimé du canal avec un avertissement anonyme et le message est signalé pour examen.', }, actionableMentionWhisperOptions: { - invite: 'Invitez-les', + inviteToSubmitExpense: 'Inviter à soumettre des dépenses', + inviteToChat: 'Inviter uniquement à discuter', nothing: 'Ne rien faire', }, actionableMentionJoinWorkspaceOptions: { diff --git a/src/languages/it.ts b/src/languages/it.ts index 82906b432e45..d06bfd1a3c6d 100644 --- a/src/languages/it.ts +++ b/src/languages/it.ts @@ -6261,8 +6261,9 @@ const translations = { levelThreeResult: 'Messaggio rimosso dal canale più avviso anonimo e messaggio segnalato per revisione.', }, actionableMentionWhisperOptions: { - invite: 'Invitali', - nothing: 'Do nothing', + inviteToSubmitExpense: 'Invita a inviare le spese', + inviteToChat: 'Invita solo a chattare', + nothing: 'Non fare nulla', }, actionableMentionJoinWorkspaceOptions: { accept: 'Accetta', diff --git a/src/languages/ja.ts b/src/languages/ja.ts index 80d4d4b5d8aa..35ae2b644bee 100644 --- a/src/languages/ja.ts +++ b/src/languages/ja.ts @@ -6221,7 +6221,8 @@ const translations = { levelThreeResult: 'チャンネルからメッセージが削除され、匿名の警告が行われ、メッセージがレビューのために報告されました。', }, actionableMentionWhisperOptions: { - invite: '招待する', + inviteToSubmitExpense: '経費の提出に招待する', + inviteToChat: 'チャットのみ招待', nothing: '何もしない', }, actionableMentionJoinWorkspaceOptions: { diff --git a/src/languages/nl.ts b/src/languages/nl.ts index 02c3e046c551..2da48e401e45 100644 --- a/src/languages/nl.ts +++ b/src/languages/nl.ts @@ -6253,8 +6253,9 @@ const translations = { levelThreeResult: 'Bericht verwijderd uit kanaal plus anonieme waarschuwing en bericht is gerapporteerd voor beoordeling.', }, actionableMentionWhisperOptions: { - invite: 'Nodig hen uit', - nothing: 'Do nothing', + inviteToSubmitExpense: 'Uitnodigen om onkosten in te dienen', + inviteToChat: 'Alleen uitnodigen om te chatten', + nothing: 'Niets doen', }, actionableMentionJoinWorkspaceOptions: { accept: 'Accepteren', diff --git a/src/languages/pl.ts b/src/languages/pl.ts index ea8bad34c374..bcc78f0313bc 100644 --- a/src/languages/pl.ts +++ b/src/languages/pl.ts @@ -6238,8 +6238,9 @@ const translations = { levelThreeResult: 'Wiadomość usunięta z kanału, dodano anonimowe ostrzeżenie, a wiadomość została zgłoszona do przeglądu.', }, actionableMentionWhisperOptions: { - invite: 'Zaproś ich', - nothing: 'Do nothing', + inviteToSubmitExpense: 'Zaproś do przesyłania wydatków', + inviteToChat: 'Zaproś tylko do czatu', + nothing: 'Nie rób nic', }, actionableMentionJoinWorkspaceOptions: { accept: 'Akceptuj', diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts index 512e58368c27..46f554d85806 100644 --- a/src/languages/pt-BR.ts +++ b/src/languages/pt-BR.ts @@ -6251,7 +6251,8 @@ const translations = { levelThreeResult: 'Mensagem removida do canal, além de um aviso anônimo, e a mensagem foi relatada para revisão.', }, actionableMentionWhisperOptions: { - invite: 'Convide-os', + inviteToSubmitExpense: 'Convidar para enviar despesas', + inviteToChat: 'Convidar apenas para conversar', nothing: 'Não faça nada', }, actionableMentionJoinWorkspaceOptions: { diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts index bb5ff6bbf7c0..7c6ef4d08aa7 100644 --- a/src/languages/zh-hans.ts +++ b/src/languages/zh-hans.ts @@ -6140,8 +6140,9 @@ const translations = { levelThreeResult: '消息已从频道中移除,并收到匿名警告,消息已提交审核。', }, actionableMentionWhisperOptions: { - invite: '邀请他们', - nothing: 'Do nothing', + inviteToSubmitExpense: '邀请提交费用', + inviteToChat: '仅邀请聊天', + nothing: '什么都不做', }, actionableMentionJoinWorkspaceOptions: { accept: '接受',