Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
message_events: Remove existing messages that were updated.
Aman Agrawal70c9c2e13717
diff --git a/static/js/message_events.js b/static/js/message_events.jsindex 6882117731e..542106494aa 100644--- a/static/js/message_events.js+++ b/static/js/message_events.js@@ -368,6 +368,17 @@ export function update_messages(events) {message_lists.current.remove_and_rerender(message_ids_to_remove);message_lists.current.add_messages(event_messages);} else {+ // Remove existing message that were updated, since+ // they may not be a part of the filter now. Also,+ // this will help us rerender them via+ // maybe_add_narrowed_messages, if they were+ // simply updated.+ const updated_messages = event_messages.filter(+ (msg) => message_lists.current.data.get(msg.id) !== undefined,+ );+ message_lists.current.remove_and_rerender(+ updated_messages.map((msg) => msg.id),+ );// For filters that cannot be processed locally, ask server.maybe_add_narrowed_messages(event_messages,