Skip to content

Commit

Permalink
Merge pull request #11244 from Expensify/amechler-add-team-dot-check
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Mechler authored Sep 23, 2022
2 parents 5898727 + ce1f588 commit 85584c3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/libs/SidebarUtils.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Onyx from 'react-native-onyx';
import _ from 'underscore';
import Str from 'expensify-common/lib/str';
import lodashGet from 'lodash/get';
import ONYXKEYS from '../ONYXKEYS';
import * as ReportUtils from './ReportUtils';
import * as Localize from './Localize';
Expand Down Expand Up @@ -143,8 +144,12 @@ function getOrderedReportIDs() {
return false;
}

// We let Free Plan default rooms to be shown in the App - it's the one exception to the beta, otherwise do not show policy rooms in product
if (ReportUtils.isDefaultRoom(report) && !Permissions.canUseDefaultRooms(betas) && ReportUtils.getPolicyType(report, policies) !== CONST.POLICY.TYPE.FREE) {
// We let Free Plan default rooms to be shown in the App, or rooms that also have a Guide in them.
// It's the two exceptions to the beta, otherwise do not show policy rooms in product
if (ReportUtils.isDefaultRoom(report)
&& !Permissions.canUseDefaultRooms(betas)
&& ReportUtils.getPolicyType(report, policies) !== CONST.POLICY.TYPE.FREE
&& !ReportUtils.hasExpensifyGuidesEmails(lodashGet(report, ['participants'], []))) {
return false;
}

Expand Down

0 comments on commit 85584c3

Please sign in to comment.