Skip to content

Commit

Permalink
last task
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhildewoolkar authored Feb 20, 2024
1 parent 84fdca0 commit 5f57376
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function MentionUserRenderer({style, tnode, TDefaultRenderer, currentUserPersona
navigationRoute = ROUTES.PROFILE.getRoute(htmlAttribAccountID);
} else if ('data' in tnode && !isEmptyObject(tnode.data)) {
// We need to remove the LTR unicode and leading @ from data as it is not part of the login
displayNameOrLogin = tnode.data.replace(CONST.UNICODE.LTR, '').slice(1).toLowerCase();
displayNameOrLogin = tnode.data.replace(CONST.UNICODE.LTR, '').slice(1);

accountID = PersonalDetailsUtils.getAccountIDsByLogins([displayNameOrLogin])?.[0];
navigationRoute = ROUTES.DETAILS.getRoute(displayNameOrLogin);
Expand Down
2 changes: 1 addition & 1 deletion src/libs/PersonalDetailsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function getPersonalDetailsByIDs(accountIDs: number[], currentUserAccountID: num
*/
function getAccountIDsByLogins(logins: string[]): number[] {
return logins.reduce<number[]>((foundAccountIDs, login) => {
const currentDetail = personalDetails.find((detail) => detail?.login === login);
const currentDetail = personalDetails.find((detail) => detail?.login === login?.toLowerCase());
if (!currentDetail) {
// generate an account ID because in this case the detail is probably new, so we don't have a real accountID yet
foundAccountIDs.push(UserUtils.generateAccountID(login));
Expand Down

0 comments on commit 5f57376

Please sign in to comment.