Skip to content

Commit

Permalink
Merge pull request #24609 from Nikhil-Vats/24593_fix_LHN_attachment_bug
Browse files Browse the repository at this point in the history
Fix chat hidden from LHN when last message is attachment

(cherry picked from commit afb6732)
  • Loading branch information
johnmlee101 authored and OSBotify committed Aug 16, 2023
1 parent 0b31604 commit 5f94034
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 5f94034

Please sign in to comment.