Skip to content

Commit

Permalink
fix LHN user name disappears from WS admin rooms
Browse files Browse the repository at this point in the history
  • Loading branch information
Kalydosos committed Feb 5, 2025
1 parent 2f021bc commit e46461a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5041,7 +5041,6 @@ const translations = {
stripePaid: ({amount, currency}: StripePaidParams) => `paid ${currency}${amount}`,
takeControl: `took control`,
integrationSyncFailed: ({label, errorMessage}: IntegrationSyncFailedParams) => `failed to sync with ${label}${errorMessage ? ` ("${errorMessage}")` : ''}`,
removeMember: ({email, role}: AddEmployeeParams) => `removed ${role} ${email}`,
addEmployee: ({email, role}: AddEmployeeParams) => `added ${email} as ${role === 'member' || role === 'user' ? 'a member' : 'an admin'}`,
updateRole: ({email, currentRole, newRole}: UpdateRoleParams) =>
`updated the role of ${email} to ${newRole === 'member' || newRole === 'user' ? 'member' : newRole} (previously ${
Expand Down
4 changes: 2 additions & 2 deletions src/libs/ReportActionsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1773,11 +1773,11 @@ function getPolicyChangeLogEmployeeLeftMessage(reportAction: ReportAction, useNa
return '';
}
const originalMessage = getOriginalMessage(reportAction);
const personalDetails = getPersonalDetailsByIDs(reportAction.actorAccountID ? [reportAction.actorAccountID] : [], 0)?.at(0);
const personalDetails = getPersonalDetailsByIDs({accountIDs: reportAction.actorAccountID ? [reportAction.actorAccountID] : [], currentUserAccountID: 0})?.at(0);
if (!!originalMessage && !originalMessage.email) {
originalMessage.email = personalDetails?.login;
}
const nameOrEmail = useName && !!personalDetails?.firstName ? `${personalDetails?.firstName}: ` : originalMessage?.email ?? '';
const nameOrEmail = useName && !!personalDetails?.firstName ? `${personalDetails?.firstName}:` : originalMessage?.email ?? '';
const formattedNameOrEmail = formatPhoneNumber(nameOrEmail);
return translateLocal('report.actions.type.employeeLeft', {nameOrEmail: formattedNameOrEmail});
}
Expand Down

0 comments on commit e46461a

Please sign in to comment.