Skip to content

Commit

Permalink
Merge pull request #35439 from Expensify/blimpich-notificationsPerson…
Browse files Browse the repository at this point in the history
…alDetails

remove unnecessary concierge check
  • Loading branch information
Beamanator authored Feb 26, 2024
2 parents 89d5689 + fe26564 commit 4b31f4b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 32 deletions.
16 changes: 0 additions & 16 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1617,22 +1617,6 @@ function getPersonalDetailsForAccountID(accountID: number): Partial<PersonalDeta
if (!accountID) {
return {};
}
if (Number(accountID) === CONST.ACCOUNT_ID.CONCIERGE) {
return {
accountID,
displayName: 'Concierge',
login: CONST.EMAIL.CONCIERGE,
avatar: UserUtils.getDefaultAvatar(accountID),
};
}
if (Number(accountID) === CONST.ACCOUNT_ID.NOTIFICATIONS) {
return {
accountID,
displayName: 'Expensify',
login: CONST.EMAIL.NOTIFICATIONS,
avatar: UserUtils.getDefaultAvatar(accountID),
};
}
return (
allPersonalDetails?.[accountID] ?? {
avatar: UserUtils.getDefaultAvatar(accountID),
Expand Down
23 changes: 7 additions & 16 deletions src/pages/DetailsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,22 +64,13 @@ function DetailsPage({personalDetails, route, session}: DetailsPageProps) {
let details = Object.values(personalDetails ?? {}).find((personalDetail) => personalDetail?.login === login.toLowerCase());

if (!details) {
if (login === CONST.EMAIL.CONCIERGE) {
details = {
accountID: CONST.ACCOUNT_ID.CONCIERGE,
login,
displayName: 'Concierge',
avatar: UserUtils.getDefaultAvatar(CONST.ACCOUNT_ID.CONCIERGE),
};
} else {
const optimisticAccountID = UserUtils.generateAccountID(login);
details = {
accountID: optimisticAccountID,
login,
displayName: login,
avatar: UserUtils.getDefaultAvatar(optimisticAccountID),
};
}
const optimisticAccountID = UserUtils.generateAccountID(login);
details = {
accountID: optimisticAccountID,
login,
displayName: login,
avatar: UserUtils.getDefaultAvatar(optimisticAccountID),
};
}

const isSMSLogin = details.login ? Str.isSMSLogin(details.login) : false;
Expand Down

0 comments on commit 4b31f4b

Please sign in to comment.