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
message: Mutate messages for reaction events here, instead of in msglists
This looks potentially NFC, but in fact it fixes part of 455:
it fixes the issue as far as reactions are concerned. The change
is NFC only if the message appears in just one message list.
In addition to the symptom explained at zulip#455, this fixes another,
which exists now that we've added the central message store with
`reconcileMessages`. It's arguably a bit of an inverse of zulip#455, but
fundamentally the same issue: if there are currently *zero* message
lists that contain the message, then we would drop the update. Then
on later fetching the same message, we'd use the version we had (for
the good reason explained in reconcileMessages) but in fact it'd be
stale.
This zero-message-lists symptom also reproduces with other kinds of
updates that we handle: editing a message, and adding/removing
flags. So, in the regression test for this symptom, I've tried to
make some reusable test code that we can use when we fix those other
ways of updating messages.
Co-authored-by: Chris Bobbe <[email protected]>
Fixes-partly: zulip#455
0 commit comments