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
api: Extract and parse UpdateMessageMoveData from UpdateMessageEvent
This data structure encapsulates some checks so that we can make all
fields non-nullable, with reasonable fallback values. As of writing,
we do not use origStreamId (a.k.a.: 'stream_id') when there was no
message move, even though it is present if there were content edits
This makes dropping 'stream_id' when parsing `moveData` into `null`
acceptable for now.
This also allows us to drop the `assert`'s and "TODO(log)"'s, because
the stacktrace we need can be retrieved after throwing these
`FormatException`'s.
This is similar to zulip-mobile code for parsing move data. The main
difference is that we check the value of `propagate_mode`, which is
documented to be present on message moves. With this single indicator,
the logic is crisp for ruling out non-move message update events.
See Greg's comment on this:
zulip#1311 (comment)
Signed-off-by: Zixuan James Li <[email protected]>
0 commit comments