process_from_server: Fix message sent in search view not appearing.

Earlier, on sending a new message in a search view it didn't
appear in that view for the sender.

This was because the message event received by the sender
was processed by 'msg_list.view.rerender_messages' which
effectively did nothing because the message is not
rendered in the first place during local echo in that
message list view.

We can't determine locally if the message should be added
to the search narrow. So, we use maybe_add_narrowed_messages
when narrowed to such views.

This fixes the bug and the message appears in the search view.
This commit is contained in:
Prakhar Pratyush
2024-07-15 19:53:45 +05:30
committed by Tim Abbott
parent 629e6c701c
commit 3090247221
5 changed files with 176 additions and 92 deletions

View File

@@ -137,6 +137,7 @@ EXEMPT_FILES = make_set(
"web/src/message_edit.js",
"web/src/message_edit_history.ts",
"web/src/message_events.js",
"web/src/message_events_util.js",
"web/src/message_feed_loading.ts",
"web/src/message_feed_top_notices.ts",
"web/src/message_fetch.js",