diff --git a/src/libs/OptionsListUtils.ts b/src/libs/OptionsListUtils.ts index c3325237a7ab..e5426363b14d 100644 --- a/src/libs/OptionsListUtils.ts +++ b/src/libs/OptionsListUtils.ts @@ -305,7 +305,7 @@ Onyx.connect({ const transactionThreadReportID = ReportActionUtils.getOneTransactionThreadReportID(reportID, actions[reportActions[0]]); if (transactionThreadReportID) { const transactionThreadReportActionsArray = Object.values(actions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${transactionThreadReportID}`] ?? {}); - sortedReportActions = ReportActionUtils.getCombinedReportActions(sortedReportActions, transactionThreadReportID, transactionThreadReportActionsArray, reportID); + sortedReportActions = ReportActionUtils.getCombinedReportActions(sortedReportActions, transactionThreadReportID, transactionThreadReportActionsArray, reportID, false); } lastReportActions[reportID] = sortedReportActions[0]; diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index 4d126cf9cbf4..44a2cc62df3c 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -404,6 +404,7 @@ function getCombinedReportActions( transactionThreadReportID: string | null, transactionThreadReportActions: ReportAction[], reportID?: string, + shouldFilterIOUAction = true, ): ReportAction[] { const isSentMoneyReport = reportActions.some((action) => isSentMoneyReportAction(action)); @@ -431,7 +432,7 @@ function getCombinedReportActions( const isSelfDM = report?.chatType === CONST.REPORT.CHAT_TYPE.SELF_DM; // Filter out request and send money request actions because we don't want to show any preview actions for one transaction reports const filteredReportActions = [...filteredParentReportActions, ...filteredTransactionThreadReportActions].filter((action) => { - if (!isMoneyRequestAction(action)) { + if (!isMoneyRequestAction(action) || !shouldFilterIOUAction) { return true; } const actionType = getOriginalMessage(action)?.type ?? '';