Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -963,6 +963,7 @@ const CONST = {
GUIDES_DOMAIN: 'team.expensify.com',
HELP: 'help@expensify.com',
INTEGRATION_TESTING_CREDS: 'integrationtestingcreds@expensify.com',
NOTIFICATIONS: 'notifications@expensify.com',
PAYROLL: 'payroll@expensify.com',
QA: 'qa@expensify.com',
QA_TRAVIS: 'qa+travisreceipts@expensify.com',
Expand All @@ -982,6 +983,7 @@ const CONST = {
FIRST_RESPONDER: Number(Config?.EXPENSIFY_ACCOUNT_ID_FIRST_RESPONDER ?? 9375152),
HELP: Number(Config?.EXPENSIFY_ACCOUNT_ID_HELP ?? -1),
INTEGRATION_TESTING_CREDS: Number(Config?.EXPENSIFY_ACCOUNT_ID_INTEGRATION_TESTING_CREDS ?? -1),
NOTIFICATIONS: Number(Config?.EXPENSIFY_ACCOUNT_ID_NOTIFICATIONS ?? 11665625),
PAYROLL: Number(Config?.EXPENSIFY_ACCOUNT_ID_PAYROLL ?? 9679724),
QA: Number(Config?.EXPENSIFY_ACCOUNT_ID_QA ?? 3126513),
QA_TRAVIS: Number(Config?.EXPENSIFY_ACCOUNT_ID_QA_TRAVIS ?? 8595733),
Expand Down Expand Up @@ -1408,6 +1410,7 @@ const CONST = {
this.EMAIL.FIRST_RESPONDER,
this.EMAIL.HELP,
this.EMAIL.INTEGRATION_TESTING_CREDS,
this.EMAIL.NOTIFICATIONS,
this.EMAIL.PAYROLL,
this.EMAIL.QA,
this.EMAIL.QA_TRAVIS,
Expand Down
7 changes: 6 additions & 1 deletion src/libs/OptionsListUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1224,7 +1224,7 @@ function getOptions(
}

// Exclude the current user from the personal details list
const optionsToExclude = [{login: currentUserLogin}];
const optionsToExclude = [{login: currentUserLogin}, {login: CONST.EMAIL.NOTIFICATIONS}];

// If we're including selected options from the search results, we only want to exclude them if the search input is empty
// This is because on certain pages, we show the selected options at the top when the search input is empty
Expand All @@ -1246,6 +1246,11 @@ function getOptions(
break;
}

// Skip notifications@expensify.com
if (reportOption.login === CONST.EMAIL.NOTIFICATIONS) {
continue;
}

const isCurrentUserOwnedPolicyExpenseChatThatCouldShow =
reportOption.isPolicyExpenseChat && reportOption.ownerAccountID === currentUserAccountID && includeOwnedWorkspaceChats && !reportOption.isArchivedRoom;

Expand Down
2 changes: 2 additions & 0 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3424,6 +3424,8 @@ function shouldReportBeInOptionList(
report?.reportName === undefined ||
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
report?.isHidden ||
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
report?.participantAccountIDs?.includes(CONST.ACCOUNT_ID.NOTIFICATIONS) ||

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a blocker, just a small suggestion. In the future, if we frequently use || in conditions, we can also modify the option ignoreConditionalTests

 '@typescript-eslint/prefer-nullish-coalescing': [
      'error',
      {
          ignoreConditionalTests: true,
      }
  ],

https://typescript-eslint.io/rules/prefer-nullish-coalescing#ignoreconditionaltests

(report?.participantAccountIDs?.length === 0 &&
!isChatThread(report) &&
!isPublicRoom(report) &&
Expand Down
4 changes: 3 additions & 1 deletion src/pages/home/report/ReportActionItemSingle.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ function ReportActionItemSingle(props) {
}, [isWorkspaceActor, reportID, actorAccountID, props.action.delegateAccountID, iouReportID, displayAllActors]);

const shouldDisableDetailPage = useMemo(
() => !isWorkspaceActor && ReportUtils.isOptimisticPersonalDetail(props.action.delegateAccountID ? props.action.delegateAccountID : actorAccountID),
() =>
actorAccountID === CONST.ACCOUNT_ID.NOTIFICATIONS ||
(!isWorkspaceActor && ReportUtils.isOptimisticPersonalDetail(props.action.delegateAccountID ? props.action.delegateAccountID : actorAccountID)),
[props.action, isWorkspaceActor, actorAccountID],
);

Expand Down