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

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2024-05-23 17:37:58 -07:00 committed by Tim Abbott
parent 825fa6f0e1
commit a68bc645ed
1 changed files with 3 additions and 3 deletions

View File

@ -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);
}
}