From feb6ba6c52220c057a6823d6a99f18d62c13b6b2 Mon Sep 17 00:00:00 2001 From: Aman Agrawal Date: Sat, 9 Nov 2024 17:48:35 +0530 Subject: [PATCH] message_events: Remove non matching edited msgs from search result. --- web/src/message_events_util.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/src/message_events_util.ts b/web/src/message_events_util.ts index 47acc28a7a..df2365a897 100644 --- a/web/src/message_events_util.ts +++ b/web/src/message_events_util.ts @@ -80,6 +80,9 @@ export function maybe_add_narrowed_messages( return new_msg; }); + // Remove the elsewhere_messages from the message list since + // they don't match the filter as per data from server. + msg_list.remove_and_rerender(elsewhere_messages.map((msg) => msg.id)); callback(new_messages, msg_list); unread_ops.process_visible(); compose_notifications.notify_messages_outside_current_search(elsewhere_messages);