You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
unreads: Fix false positives in a debug-only warning
We don't expect UpdateMessageEvent to signal a change in a message's
read state; that's what UpdateMessageFlagsEvent is for. Our unreads
model does process `UpdateMessageEvent`s, though, to apply changes
in a message's mentioned state.
Also, we expect the client to be synced with the server for all
messages' read state, assuming !oldUnreadsMissing.
Where we process `UpdateMessageEvent`s, we have a `debugLog` line to
alert us if one of these expectations isn't being met. It's been
giving false positives when we get an UpdateMessageEvent for a bulk
message move where some of the moved messages are read and some
aren't. Since the server only intends the event's `flags` to apply
to the event's `messageId` (one message), we should only be checking
that message, not all the messages in the event's `messageIds`.
From the API doc on `flags`:
https://zulip.com/api/get-events#update_message
> The user's personal message flags for the message with ID
> message_id following the edit.
0 commit comments