Skip to content

Commit 0b6fa7a

Browse files
aldo-expensifyOSBotify
authored andcommitted
Merge pull request #43054 from Expensify/aldo_fix-system-chats
Fix system chat participant count (cherry picked from commit d51b3eb)
1 parent 42fee70 commit 0b6fa7a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/pages/ReportDetailsPage.tsx

+5-4
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,12 @@ function ReportDetailsPage({policies, report, session, personalDetails}: ReportD
9292
const isGroupChat = useMemo(() => ReportUtils.isGroupChat(report), [report]);
9393
const isThread = useMemo(() => ReportUtils.isThread(report), [report]);
9494
const participants = useMemo(() => {
95-
if (isGroupChat || isSystemChat) {
96-
// Filter out the current user from the particpants of the systemChat
97-
return ReportUtils.getParticipantAccountIDs(report.reportID ?? '').filter((accountID) => accountID !== session?.accountID && isSystemChat);
95+
if (isGroupChat) {
96+
return ReportUtils.getParticipantAccountIDs(report.reportID ?? '');
97+
}
98+
if (isSystemChat) {
99+
return ReportUtils.getParticipantAccountIDs(report.reportID ?? '').filter((accountID) => accountID !== session?.accountID);
98100
}
99-
100101
return ReportUtils.getVisibleChatMemberAccountIDs(report.reportID ?? '');
101102
}, [report, session, isGroupChat, isSystemChat]);
102103

0 commit comments

Comments
 (0)