From 16d62f299c5382b11f1881c6aca4ab61079c93aa Mon Sep 17 00:00:00 2001 From: Rodrigo Lino da Costa Date: Tue, 30 Jul 2024 16:48:13 -0300 Subject: [PATCH] fixing copy to clipboard mentions --- src/libs/Parser.ts | 4 +--- src/libs/ReportActionsUtils.ts | 4 ++-- src/pages/home/report/ReportActionItem.tsx | 3 --- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/libs/Parser.ts b/src/libs/Parser.ts index 9364b147e8ea..15a4981225f3 100644 --- a/src/libs/Parser.ts +++ b/src/libs/Parser.ts @@ -2,9 +2,7 @@ import {ExpensiMark} from 'expensify-common'; import Onyx from 'react-native-onyx'; import ONYXKEYS from '@src/ONYXKEYS'; -import * as Localize from './Localize'; import Log from './Log'; -import {getEffectiveDisplayName} from './PersonalDetailsUtils'; import * as ReportConnection from './ReportConnection'; const accountIDToNameMap: Record = {}; @@ -17,7 +15,7 @@ Onyx.connect({ return; } - accountIDToNameMap[personalDetails.accountID] = getEffectiveDisplayName(personalDetails) ?? Localize.translateLocal('common.hidden'); + accountIDToNameMap[personalDetails.accountID] = personalDetails.login ?? personalDetails.displayName ?? String(personalDetails.accountID); }); }, }); diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index 89d043cad7a2..0d92df4e8ba8 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -1303,7 +1303,7 @@ function getReportActionMessageFragments(action: ReportAction): Message[] { } if (isActionOfType(action, CONST.REPORT.ACTIONS.TYPE.ROOM_CHANGE_LOG.UPDATE_ROOM_DESCRIPTION)) { - const message = `${Localize.translateLocal('roomChangeLog.updateRoomDescription')} ${getOriginalMessage(action)?.description}`; + const message = getUpdateRoomDescriptionMessage(action); return [{text: message, html: `${message}`, type: 'COMMENT'}]; } @@ -1585,7 +1585,7 @@ function getExportIntegrationActionFragments(reportAction: OnyxEntry; } else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.MERGED_WITH_CASH_TRANSACTION) { children = ; - } else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.ROOM_CHANGE_LOG.UPDATE_ROOM_DESCRIPTION) { - const message = ReportActionsUtils.getUpdateRoomDescriptionMessage(action); - children = ; } else if (ReportActionsUtils.isActionOfType(action, CONST.REPORT.ACTIONS.TYPE.DISMISSED_VIOLATION)) { children = ; } else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.ADD_TAG) {