Skip to content

Commit a9ca01e

Browse files
Skip hidden filter for self DM, #admins, and archived chats in search router
The excludeHidden filter introduced in PR 87796 incorrectly filters out self DM, #admins rooms, and archived workspace chats when the participant's notificationPreference is undefined/null (treated as hidden by isHiddenForCurrentUser). This exempts those chat types from the filter. Co-authored-by: Shridhar Goel <ShridharGoel@users.noreply.github.com>
1 parent 4386ecc commit a9ca01e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/libs/OptionsListUtils/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2506,7 +2506,12 @@ function getValidOptions(
25062506
if (report.isThread && report.notificationPreference === CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN) {
25072507
return false;
25082508
}
2509-
if (!report.isThread) {
2509+
if (
2510+
!report.isThread &&
2511+
report.item?.chatType !== CONST.REPORT.CHAT_TYPE.SELF_DM &&
2512+
report.item?.chatType !== CONST.REPORT.CHAT_TYPE.POLICY_ADMINS &&
2513+
!report.private_isArchived
2514+
) {
25102515
const participant = report.item?.participants?.[currentUserAccountID];
25112516
if (participant && isHiddenForCurrentUser(participant.notificationPreference)) {
25122517
return false;

0 commit comments

Comments
 (0)