Skip to content

Commit

Permalink
Update condition for canJoin
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhenjaHorbach committed Apr 25, 2024
1 parent ab6a28a commit cb50951
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/ReportDetailsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function ReportDetailsPage({policies, report, session, personalDetails}: ReportD

const isSelfDM = useMemo(() => ReportUtils.isSelfDM(report), [report]);
const canJoinOrLeave = !isSelfDM && !isGroupChat && (isChatThread || isUserCreatedPolicyRoom || canLeaveRoom || canLeavePolicyExpenseChat);
const canJoin = canJoinOrLeave && report.notificationPreference === CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN;
const canJoin = report.notificationPreference === CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN;

useEffect(() => {
// Do not fetch private notes if isLoadingPrivateNotes is already defined, or if the network is offline, or if the report is a self DM.
Expand Down

0 comments on commit cb50951

Please sign in to comment.