Skip to content

Commit

Permalink
Merge pull request #39384 from GandalfGwaihir/issue38581
Browse files Browse the repository at this point in the history
[Fix]: New chat shows time zone for Unvalidated Accounts
  • Loading branch information
aldo-expensify authored Apr 4, 2024
2 parents cf0e60b + 6b7e935 commit 823e9c9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pages/ProfilePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,12 @@ function ProfilePage({personalDetails, personalDetailsMetadata, route, session,
const fallbackIcon = details?.fallbackIcon ?? '';
const login = details?.login ?? '';
const timezone = details?.timezone;
const reportRecipient = personalDetails?.[accountID];
const isParticipantValidated = reportRecipient?.validated ?? false;

// If we have a reportID param this means that we
// arrived here via the ParticipantsPage and should be allowed to navigate back to it
const shouldShowLocalTime = !ReportUtils.hasAutomatedExpensifyAccountIDs([accountID]) && !isEmptyObject(timezone);
const shouldShowLocalTime = !ReportUtils.hasAutomatedExpensifyAccountIDs([accountID]) && !isEmptyObject(timezone) && isParticipantValidated;
let pronouns = details?.pronouns ?? '';
if (pronouns?.startsWith(CONST.PRONOUNS.PREFIX)) {
const localeKey = pronouns.replace(CONST.PRONOUNS.PREFIX, '');
Expand Down

0 comments on commit 823e9c9

Please sign in to comment.