mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 07:23:22 +00:00
In a refactor last fall, we changed `set_message_booleans` to mutate state (specifically, destroying msg.flags in favor of setting properties like `msg.unread`). This was fine for most code paths, but the maybe_add_narrowed_messages code path called `message_store.add_message_metadata` twice (once after talking to the server to find out whether the messages go into the current narrow), and so when we extracted set_message_booleans from that, the second call didn't properly short-circuit. We fix this by just removing the second call, and also add a comment warning about the add_message_metadata call there as being dangerous. Fixes #8184.
11 KiB
11 KiB