Skip to content

Commit

Permalink
Merge pull request #44368 from bernhardoj/fix/44216-split-dm-doesnt-s…
Browse files Browse the repository at this point in the history
…how-immediately

Fix 1:1 DMs are not immediately shown when splitting expense
  • Loading branch information
marcochavezf authored Jun 25, 2024
2 parents 015e69b + 0538779 commit a272c4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2941,7 +2941,7 @@ function getReportPreviewMessage(
const report = typeof reportOrID === 'string' ? allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${reportOrID}`] : reportOrID;
const reportActionMessage = ReportActionsUtils.getReportActionHtml(iouReportAction);

if (isEmptyObject(report) || !report?.reportID || isEmptyObject(iouReportAction)) {
if (isEmptyObject(report) || !report?.reportID) {
// The iouReport is not found locally after SignIn because the OpenApp API won't return iouReports if they're settled
// As a temporary solution until we know how to solve this the best, we just use the message that returned from BE
return reportActionMessage;
Expand Down Expand Up @@ -3019,7 +3019,7 @@ function getReportPreviewMessage(
return Localize.translateLocal('iou.fieldPending');
}

const originalMessage = ReportActionsUtils.isMoneyRequestAction(iouReportAction) ? ReportActionsUtils.getOriginalMessage(iouReportAction) : undefined;
const originalMessage = !isEmptyObject(iouReportAction) && ReportActionsUtils.isMoneyRequestAction(iouReportAction) ? ReportActionsUtils.getOriginalMessage(iouReportAction) : undefined;

// Show Paid preview message if it's settled or if the amount is paid & stuck at receivers end for only chat reports.
if (isSettled(report.reportID) || (report.isWaitingOnBankAccount && isPreviewMessageForParentChatReport)) {
Expand Down

0 comments on commit a272c4b

Please sign in to comment.