Skip to content

Commit 7a48b0d

Browse files
neil-marcelliniOSBotify
authored andcommitted
Merge pull request #43189 from Expensify/revert-42894-fix/41645
Revert "Display send money action as paid system message in combine report" (cherry picked from commit c2d427d)
1 parent b3eba91 commit 7a48b0d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/libs/ReportActionsUtils.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -320,13 +320,13 @@ function getCombinedReportActions(reportActions: ReportAction[], transactionThre
320320

321321
const report = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${reportID}`];
322322
const isSelfDM = report?.chatType === CONST.REPORT.CHAT_TYPE.SELF_DM;
323-
// Filter out request money actions because we don't want to show any preview actions for one transaction reports
323+
// Filter out request and send money request actions because we don't want to show any preview actions for one transaction reports
324324
const filteredReportActions = [...reportActions, ...filteredTransactionThreadReportActions].filter((action) => {
325325
const actionType = (action as OriginalMessageIOU).originalMessage?.type ?? '';
326326
if (isSelfDM) {
327-
return actionType !== CONST.IOU.REPORT_ACTION_TYPE.CREATE;
327+
return actionType !== CONST.IOU.REPORT_ACTION_TYPE.CREATE && !isSentMoneyReportAction(action);
328328
}
329-
return actionType !== CONST.IOU.REPORT_ACTION_TYPE.CREATE && actionType !== CONST.IOU.REPORT_ACTION_TYPE.TRACK;
329+
return actionType !== CONST.IOU.REPORT_ACTION_TYPE.CREATE && actionType !== CONST.IOU.REPORT_ACTION_TYPE.TRACK && !isSentMoneyReportAction(action);
330330
});
331331

332332
return getSortedReportActions(filteredReportActions, true);

src/pages/home/report/ReportActionItem.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -517,11 +517,11 @@ function ReportActionItem({
517517
if (
518518
isIOUReport(action) &&
519519
action.originalMessage &&
520-
// For the pay flow, we only want to show MoneyRequestAction when sending money and we're not in the combine report. Otherwise, we display a regular system message
520+
// For the pay flow, we only want to show MoneyRequestAction when sending money. When paying, we display a regular system message
521521
(action.originalMessage.type === CONST.IOU.REPORT_ACTION_TYPE.CREATE ||
522522
action.originalMessage.type === CONST.IOU.REPORT_ACTION_TYPE.SPLIT ||
523523
action.originalMessage.type === CONST.IOU.REPORT_ACTION_TYPE.TRACK ||
524-
(isSendingMoney && !transactionThreadReport?.reportID))
524+
isSendingMoney)
525525
) {
526526
// There is no single iouReport for bill splits, so only 1:1 requests require an iouReportID
527527
const iouReportID = action.originalMessage.IOUReportID ? action.originalMessage.IOUReportID.toString() : '0';

0 commit comments

Comments
 (0)