From 5a7b440392a9cc66d944ac44ec934d91395b81ad Mon Sep 17 00:00:00 2001 From: Alexander Mechler Date: Fri, 23 Sep 2022 09:59:35 -0700 Subject: [PATCH 1/2] Add teamdot check to SideBarUtils.js --- src/libs/SidebarUtils.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/libs/SidebarUtils.js b/src/libs/SidebarUtils.js index 9bb03783d3ec..ed37f4947912 100644 --- a/src/libs/SidebarUtils.js +++ b/src/libs/SidebarUtils.js @@ -8,6 +8,7 @@ import CONST from '../CONST'; import * as OptionsListUtils from './OptionsListUtils'; import * as CollectionUtils from './CollectionUtils'; import Permissions from './Permissions'; +import lodashGet from 'lodash/get'; // Note: It is very important that the keys subscribed to here are the same // keys that are connected to SidebarLinks withOnyx(). If there was a key missing from SidebarLinks and it's data was updated @@ -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; } From ce1f588ac37f3c8deea0dda9df356853588fdc0c Mon Sep 17 00:00:00 2001 From: Alexander Mechler Date: Fri, 23 Sep 2022 10:16:25 -0700 Subject: [PATCH 2/2] Stlye --- src/libs/SidebarUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/SidebarUtils.js b/src/libs/SidebarUtils.js index ed37f4947912..0d2fce66a397 100644 --- a/src/libs/SidebarUtils.js +++ b/src/libs/SidebarUtils.js @@ -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'; @@ -8,7 +9,6 @@ import CONST from '../CONST'; import * as OptionsListUtils from './OptionsListUtils'; import * as CollectionUtils from './CollectionUtils'; import Permissions from './Permissions'; -import lodashGet from 'lodash/get'; // Note: It is very important that the keys subscribed to here are the same // keys that are connected to SidebarLinks withOnyx(). If there was a key missing from SidebarLinks and it's data was updated