Skip to content

Commit

Permalink
Merge pull request #17694 from Expensify/jasper-showArchivedRoomsNoPa…
Browse files Browse the repository at this point in the history
…rticipants

[NO QA] Show archived rooms without participants in the LHN
  • Loading branch information
mountiny authored Apr 20, 2023
2 parents 1cd304c + 77aa62c commit 96575d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1471,7 +1471,8 @@ function shouldReportBeInOptionList(report, reportIDFromRoute, isInGSDMode, curr

// Exclude reports that have no data because there wouldn't be anything to show in the option item.
// This can happen if data is currently loading from the server or a report is in various stages of being created.
if (!report || !report.reportID || !report.participants || (_.isEmpty(report.participants) && !isPublicRoom(report)) || isIOUReport(report)) {
// This can also happen for anyone accessing a public room or archived room for which they don't have access to the underlying policy.
if (!report || !report.reportID || !report.participants || (_.isEmpty(report.participants) && !isPublicRoom(report) && !isArchivedRoom(report)) || isIOUReport(report)) {
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion src/libs/SidebarUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ function getOptionData(reportID) {
const hasMultipleParticipants = participantPersonalDetailList.length > 1 || result.isChatRoom || result.isPolicyExpenseChat;
const subtitle = ReportUtils.getChatRoomSubtitle(report, policies);

const login = Str.removeSMSDomain(personalDetail.login || '');
const login = Str.removeSMSDomain(lodashGet(personalDetail, 'login', ''));
const formattedLogin = Str.isSMSLogin(login) ? LocalePhoneNumber.formatPhoneNumber(login) : login;

// We only create tooltips for the first 10 users or so since some reports have hundreds of users, causing performance to degrade.
Expand Down

0 comments on commit 96575d4

Please sign in to comment.