Skip to content

Commit

Permalink
Merge pull request #41865 from dragnoir/40654-fix
Browse files Browse the repository at this point in the history
Fix: display joined public rooms in search results
  • Loading branch information
luacmartins authored Jun 3, 2024
2 parents 174ff97 + dc6b412 commit 5829323
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/libs/OptionsListUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1529,7 +1529,8 @@ function createOptionList(personalDetails: OnyxEntry<PersonalDetailsList>, repor
.map(Number)
.filter((accountID) => accountID !== currentUserAccountID || !isOneOnOneChat);

if (!accountIDs || accountIDs.length === 0) {
const isChatRoom = ReportUtils.isChatRoom(report);
if ((!accountIDs || accountIDs.length === 0) && !isChatRoom) {
return;
}

Expand Down Expand Up @@ -1825,6 +1826,7 @@ function getOptions(
const isMoneyRequestReport = option.isMoneyRequestReport;
const isSelfDM = option.isSelfDM;
const isOneOnOneChat = option.isOneOnOneChat;
const isChatRoom = option.isChatRoom;

// For 1:1 chat, we don't want to include currentUser as participants in order to not mark 1:1 chats as having multiple participants
const accountIDs = Object.keys(report.participants ?? {})
Expand Down Expand Up @@ -1861,7 +1863,7 @@ function getOptions(
return;
}

if (!accountIDs || accountIDs.length === 0) {
if ((!accountIDs || accountIDs.length === 0) && !isChatRoom) {
return;
}

Expand Down

0 comments on commit 5829323

Please sign in to comment.