Skip to content

Commit

Permalink
Merge pull request #30171 from namhihi237/fix-29645-remove-email-doma…
Browse files Browse the repository at this point in the history
…in-in-phone

fix format phone number
  • Loading branch information
youssef-lr authored Oct 25, 2023
2 parents c81a509 + 1d3d7ad commit 6c87286
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import TextLink from '../../TextLink';
import ONYXKEYS from '../../../ONYXKEYS';
import useLocalize from '../../../hooks/useLocalize';
import CONST from '../../../CONST';
import * as LocalePhoneNumber from '../../../libs/LocalePhoneNumber';

const propTypes = {
...htmlRendererPropTypes,
Expand All @@ -40,7 +41,7 @@ function MentionUserRenderer(props) {
if (!_.isEmpty(htmlAttribAccountID)) {
const user = lodashGet(props.personalDetails, htmlAttribAccountID);
accountID = parseInt(htmlAttribAccountID, 10);
displayNameOrLogin = lodashGet(user, 'login', '') || lodashGet(user, 'displayName', '') || translate('common.hidden');
displayNameOrLogin = LocalePhoneNumber.formatPhoneNumber(lodashGet(user, 'login', '')) || lodashGet(user, 'displayName', '') || translate('common.hidden');
navigationRoute = ROUTES.PROFILE.getRoute(htmlAttribAccountID);
} else if (!_.isEmpty(props.tnode.data)) {
// We need to remove the LTR unicode and leading @ from data as it is not part of the login
Expand Down
2 changes: 1 addition & 1 deletion src/pages/workspace/WorkspaceMembersPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ function WorkspaceMembersPage(props) {
icons: [
{
source: UserUtils.getAvatar(details.avatar, accountID),
name: details.login,
name: props.formatPhoneNumber(details.login),
type: CONST.ICON_TYPE_AVATAR,
},
],
Expand Down

0 comments on commit 6c87286

Please sign in to comment.