Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: display joined public rooms in search results #41865

Merged
merged 7 commits into from
Jun 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/libs/OptionsListUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1520,7 +1520,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 @@ -1816,6 +1817,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 @@ -1852,7 +1854,7 @@ function getOptions(
return;
}

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

Expand Down
Loading