mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
The previous message.unread block in insert_local_message was non-functional. markdown.apply_markdown is overriding what that set by calling message_store.init_booleans, which happens to set the same value for the `unread` flag, and then setting individual message booleans as it finds elements like mentions during rendering. Improve this situation partially by deleting the message_unread block, and adding conversion logic to translate what the markdown processor is doing into message flags. Then, we can call message_store.set_message_flags just like we do when processing new messages arriving via the API. This will be helpful shortly, when we deduplicate the calls to message_store.set_message_flags. As noted in the lengthy TODO, this exposes the fact that we should really rework how the frontend markdown processor returns the mentioned state to its caller.
9.5 KiB
9.5 KiB