From 5f94034855bf78e2a71c6bcaae1a97ea109250d2 Mon Sep 17 00:00:00 2001 From: John Lee Date: Wed, 16 Aug 2023 17:07:33 -0400 Subject: [PATCH] Merge pull request #24609 from Nikhil-Vats/24593_fix_LHN_attachment_bug Fix chat hidden from LHN when last message is attachment (cherry picked from commit afb6732f852e61949e05b8bb97a47d0e9ca06359) --- src/libs/ReportUtils.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index aa72fc88d8c..cf7726d3f41 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -2502,7 +2502,8 @@ function shouldReportBeInOptionList(report, currentReportId, isInGSDMode, iouRep return true; } - const isEmptyChat = !ReportActionsUtils.getLastVisibleMessage(report.reportID).lastMessageText; + const lastVisibleMessage = ReportActionsUtils.getLastVisibleMessage(report.reportID); + const isEmptyChat = !lastVisibleMessage.lastMessageText && !lastVisibleMessage.lastMessageTranslationKey; // Hide only chat threads that haven't been commented on (other threads are actionable) if (isChatThread(report) && isEmptyChat) {