From a68bc645eddad4cde2b4e9ddd4ed0c471b130d83 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Thu, 23 May 2024 17:37:58 -0700 Subject: [PATCH] =?UTF-8?q?filter:=20Don=E2=80=99t=20parse=20dm-including?= =?UTF-8?q?=20operand=20as=20a=20list.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Anders Kaseorg --- web/src/filter.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/src/filter.ts b/web/src/filter.ts index 2763b79b8a..967375ccd0 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); } }