Skip to content

Commit fd94469

Browse files
authored
Merge pull request #52811 from bernhardoj/fix/52579-new-message-shows-when-creating-new-expense
2 parents 4179eef + 1ce059b commit fd94469

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/libs/ReportUtils.ts

+1
Original file line numberDiff line numberDiff line change
@@ -5165,6 +5165,7 @@ function buildOptimisticReportPreview(
51655165
actorAccountID: hasReceipt ? currentUserAccountID : reportActorAccountID,
51665166
childReportID: childReportID ?? iouReport?.reportID,
51675167
childMoneyRequestCount: 1,
5168+
childLastActorAccountID: currentUserAccountID,
51685169
childLastMoneyRequestComment: comment,
51695170
childRecentReceiptTransactionIDs: hasReceipt && !isEmptyObject(transaction) ? {[transaction?.transactionID ?? '-1']: created} : undefined,
51705171
};

src/pages/home/report/ReportActionsList.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ function ReportActionsList({
283283
}
284284

285285
// If no unread marker exists, don't set an unread marker for newly added messages from the current user.
286-
const isFromCurrentUser = accountID === (ReportActionsUtils.isReportPreviewAction(message) ? !message.childLastActorAccountID : message.actorAccountID);
286+
const isFromCurrentUser = accountID === (ReportActionsUtils.isReportPreviewAction(message) ? message.childLastActorAccountID : message.actorAccountID);
287287
const isNewMessage = !prevSortedVisibleReportActionsObjects[message.reportActionID];
288288

289289
// The unread marker will show if the action's `created` time is later than `unreadMarkerTime`.

0 commit comments

Comments
 (0)