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.

filter: Don’t parse dm-including operand as a list.

Anders Kaseorga68bc645edda
diff --git a/web/src/filter.ts b/web/src/filter.ts
index 2763b79b8a9..967375ccd0a 100644
--- a/web/src/filter.ts
+++ b/web/src/filter.ts
@@ -232,15 +232,15 @@ function message_matches_search_term(message: Message, operator: string, operand
}
case "dm-including": {
- const operand_ids = people.pm_with_operand_ids(operand);
- if (!operand_ids) {
+ const operand_user = people.get_by_email(operand);
+ if (operand_user === undefined) {
return false;
}
const user_ids = people.all_user_ids_in_pm(message);
if (!user_ids) {
return false;
}
- return user_ids.includes(operand_ids[0]);
+ return user_ids.includes(operand_user.user_id);
}
}