Skip to content

Commit

Permalink
Merge pull request #43189 from Expensify/revert-42894-fix/41645
Browse files Browse the repository at this point in the history
Revert "Display send money action as paid system message in combine report"

(cherry picked from commit c2d427d)
  • Loading branch information
neil-marcellini authored and OSBotify committed Jun 6, 2024
1 parent b3eba91 commit 7a48b0d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/libs/ReportActionsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,13 +320,13 @@ function getCombinedReportActions(reportActions: ReportAction[], transactionThre

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

return getSortedReportActions(filteredReportActions, true);
Expand Down
4 changes: 2 additions & 2 deletions src/pages/home/report/ReportActionItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -517,11 +517,11 @@ function ReportActionItem({
if (
isIOUReport(action) &&
action.originalMessage &&
// 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
// For the pay flow, we only want to show MoneyRequestAction when sending money. When paying, we display a regular system message
(action.originalMessage.type === CONST.IOU.REPORT_ACTION_TYPE.CREATE ||
action.originalMessage.type === CONST.IOU.REPORT_ACTION_TYPE.SPLIT ||
action.originalMessage.type === CONST.IOU.REPORT_ACTION_TYPE.TRACK ||
(isSendingMoney && !transactionThreadReport?.reportID))
isSendingMoney)
) {
// There is no single iouReport for bill splits, so only 1:1 requests require an iouReportID
const iouReportID = action.originalMessage.IOUReportID ? action.originalMessage.IOUReportID.toString() : '0';
Expand Down

0 comments on commit 7a48b0d

Please sign in to comment.