Skip to content

Commit

Permalink
Merge pull request #32227 from situchan/fix-32214
Browse files Browse the repository at this point in the history
fix suggested user remains visible on mention

(cherry picked from commit 7ede114)
  • Loading branch information
Joel Bettner authored and OSBotify committed Nov 29, 2023
1 parent 81e5cc4 commit 0674bea
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ function SuggestionMention({
if (!detail.login || detail.isOptimisticPersonalDetail) {
return false;
}
if (searchValue && !`${detail.displayName} ${detail.login}`.toLowerCase().includes(searchValue.toLowerCase())) {
const displayText = detail.displayName === formatPhoneNumber(detail.login) ? detail.displayName : `${detail.displayName} ${detail.login}`;
if (searchValue && !displayText.toLowerCase().includes(searchValue.toLowerCase())) {
return false;
}
return true;
Expand Down

0 comments on commit 0674bea

Please sign in to comment.