Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

people: Use visible email for matching user query.

Aman Agrawald1997d5ddab8
diff --git a/web/src/people.ts b/web/src/people.ts
index cd53620fd45..93cce78a92e 100644
--- a/web/src/people.ts
+++ b/web/src/people.ts
@@ -1415,9 +1415,8 @@ export function build_person_matcher(query: string): (user: User) => boolean {
const termlet_matchers = termlets.map((termlet) => build_termlet_matcher(termlet));
return function (user: User): boolean {
- const email = user.email.toLowerCase();
-
- if (email.startsWith(query)) {
+ const visible_email = get_visible_email(user).toLowerCase();
+ if (visible_email.startsWith(query)) {
return true;
}