zulip/zerver/openapi
Tim Abbott 05108760f6 narrow: Add support for passing oldest/newest for anchor.
A wart that has long been present inin Zulip's get_messages API is how
to request "the latest messages" in the API.  Previously, the
recommendation was basically to pass anchor=10000000000000000 (for an
appropriately huge number). An accident of the server's implementation
meant that specific number of 0s was actually important to avoid a
buggy (or at least wasteful) value of found_newest=False if the query
had specified num_after=0 (since we didn't check).

This was the cause of the mobile issue
https://github.com/zulip/zulip-mobile/issues/3654.

The solution is to allow passing a special value of anchor='newest',
basically a special string-type value that the server can interpret as
meaning the user precisely just wants the most recent messages.  We
also add an analogous anchor='oldest' or similar to avoid folks
needing to write a somewhat ugly anchor=0 for fetching the very first
messages.

We may want to also replace the use_first_unread_anchor argument to be
a "first_unread" value for the anchor parameter.

While it's not always ideal to make a value have a variable type like
this, in this case it seems like a really clean way to express the
idea of what the user is asking for in the API.
2020-01-29 12:14:06 -08:00
..
curl_param_value_generators.py tests: Remove upload-file from curl test exclude_list. 2019-11-18 12:23:38 -08:00
python_examples.py bots: Remove feedback cross realm bot. 2020-01-25 22:54:44 -08:00
test_curl_examples.py tests: Remove upload-file from curl test exclude_list. 2019-11-18 12:23:38 -08:00
zulip-2.0.yaml realm: Add private_message_policy setting. 2020-01-13 12:20:42 -08:00
zulip.yaml narrow: Add support for passing oldest/newest for anchor. 2020-01-29 12:14:06 -08:00