diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index a2cb56510f12..0c4fd9c83faa 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -6843,8 +6843,9 @@ function canJoinChat(report: OnyxInputOrEntry, parentReportAction: OnyxI return false; } + const isExpenseChat = isMoneyRequestReport(report) || isMoneyRequest(report) || isInvoiceReport(report) || isTrackExpenseReport(report); // Anyone viewing these chat types is already a participant and therefore cannot join - if (isRootGroupChat(report) || isSelfDM(report) || isInvoiceRoom(report) || isSystemChat(report)) { + if (isRootGroupChat(report) || isSelfDM(report) || isInvoiceRoom(report) || isSystemChat(report) || isExpenseChat) { return false; } diff --git a/src/pages/ReportDetailsPage.tsx b/src/pages/ReportDetailsPage.tsx index 9485dbe6c773..b680e99c1caa 100644 --- a/src/pages/ReportDetailsPage.tsx +++ b/src/pages/ReportDetailsPage.tsx @@ -446,7 +446,7 @@ function ReportDetailsPage({policies, report, session, personalDetails}: ReportD const shouldShowHoldAction = caseID !== CASES.MONEY_REPORT && (canHoldUnholdReportAction.canHoldRequest || canHoldUnholdReportAction.canUnholdRequest) && !ReportUtils.isArchivedRoom(parentReport); - const canJoin = !isExpenseReport && ReportUtils.canJoinChat(report, parentReportAction, policy); + const canJoin = ReportUtils.canJoinChat(report, parentReportAction, policy); const promotedActions = useMemo(() => { const result: PromotedAction[] = [];