diff --git a/src/pages/ReportDetailsPage.tsx b/src/pages/ReportDetailsPage.tsx index 8a3d7da0c884..07523a4d2f92 100644 --- a/src/pages/ReportDetailsPage.tsx +++ b/src/pages/ReportDetailsPage.tsx @@ -92,11 +92,12 @@ function ReportDetailsPage({policies, report, session, personalDetails}: ReportD const isGroupChat = useMemo(() => ReportUtils.isGroupChat(report), [report]); const isThread = useMemo(() => ReportUtils.isThread(report), [report]); const participants = useMemo(() => { - if (isGroupChat || isSystemChat) { - // Filter out the current user from the particpants of the systemChat - return ReportUtils.getParticipantAccountIDs(report.reportID ?? '').filter((accountID) => accountID !== session?.accountID && isSystemChat); + if (isGroupChat) { + return ReportUtils.getParticipantAccountIDs(report.reportID ?? ''); + } + if (isSystemChat) { + return ReportUtils.getParticipantAccountIDs(report.reportID ?? '').filter((accountID) => accountID !== session?.accountID); } - return ReportUtils.getVisibleChatMemberAccountIDs(report.reportID ?? ''); }, [report, session, isGroupChat, isSystemChat]);