diff --git a/src/libs/OptionsListUtils.ts b/src/libs/OptionsListUtils.ts index 8166036e8e17..288848adeb3a 100644 --- a/src/libs/OptionsListUtils.ts +++ b/src/libs/OptionsListUtils.ts @@ -1455,8 +1455,18 @@ function createOptionList(personalDetails: OnyxEntry, repor } const isSelfDM = ReportUtils.isSelfDM(report); - // Currently, currentUser is not included in participants, so for selfDM we need to add the currentUser as participants. - const accountIDs = isSelfDM ? [currentUserAccountID ?? 0] : Object.keys(report.participants ?? {}).map(Number); + let accountIDs = []; + + if (isSelfDM) { + // For selfDM we need to add the currentUser as participants. + accountIDs = [currentUserAccountID ?? 0]; + } else { + accountIDs = Object.keys(report.participants ?? {}).map(Number); + if (ReportUtils.isOneOnOneChat(report)) { + // 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 + accountIDs = accountIDs.filter((accountID) => accountID !== currentUserAccountID); + } + } if (!accountIDs || accountIDs.length === 0) { return; @@ -1676,8 +1686,18 @@ function getOptions( const isPolicyExpenseChat = option.isPolicyExpenseChat; const isMoneyRequestReport = option.isMoneyRequestReport; const isSelfDM = option.isSelfDM; - // Currently, currentUser is not included in participants, so for selfDM we need to add the currentUser as participants. - const accountIDs = isSelfDM ? [currentUserAccountID ?? 0] : Object.keys(report.participants ?? {}).map(Number); + let accountIDs = []; + + if (isSelfDM) { + // For selfDM we need to add the currentUser as participants. + accountIDs = [currentUserAccountID ?? 0]; + } else { + accountIDs = Object.keys(report.participants ?? {}).map(Number); + if (ReportUtils.isOneOnOneChat(report)) { + // 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 + accountIDs = accountIDs.filter((accountID) => accountID !== currentUserAccountID); + } + } if (isPolicyExpenseChat && report.isOwnPolicyExpenseChat && !includeOwnedWorkspaceChats) { return;