Previously, the "stream_topic_history" used to store unacked float
message ids as well in its "max_message_id" of stream and
"message_id" of topic histories.
This commit updates it to rather store only the acked message ids
here, and rather use the "echo_state" module so as to look up
for unacked messages in case of looking for recent topics, or
max message id in functions.
Fixes#27500
It is hard to reproduce the bug but this should fix any bugs
involving topic order when moving messages since we are updating
the data again from the server.
Some files already were using `noop` in place of `() => {}`.
It's both clearer what it means and is easier to type.
This updates all test files to fully use `noop`, and
adds a shared import from the test lib file.
This commit updates the 'get_server_history' function to return
early if a request is already in progress for a given stream_id,
thus preventing concurrent requests for a single stream_id.
We maintain a set 'request_pending_stream_ids', which contains all
the stream IDs for whom requests are in progress.
Using this set, we return early.
Fixes#26915.
This lets us simplify the long-ish ‘../../static/js’ paths, and will
remove the need for the ‘zrequire’ wrapper.
Signed-off-by: Anders Kaseorg <anders@zulip.com>