mirror of
https://github.com/zulip/zulip.git
synced 2025-11-23 07:52:35 +00:00
We now make it so that get_next_local_id() only returns up to 5 local ids relative to any given max id. For example, if your pointer is at message 999, we'd give out 999.01, 999.02, ..., 999.05. We also avoid giving out the same local id twice. This prevents a bug where if you had aborted a previously failed locally echoed message, a subsequent local echo would get into a funny state. In order to to prevent false alarms on using the same local id twice, we call get_next_local_id() later in the try_deliver_locally() function.
9.5 KiB
9.5 KiB