zulip/zerver
Mateusz Mandera a36f906d1a presence: Add history_limit_days param to the API.
This param allows clients to specify how much presence history they want
to fetch. Previously, the server always returned 14 days of history.
With the recent migration of the presence API to the much more efficient
system relying on incremental fetches via the last_update_id param added
in #29999, we can now afford to provide much more history to clients
that request it - as all that historical data will only be fetched once.

There are three endpoints involved:
- `/register` - this is the main useful endpoint for this, used by API
clients to fetch initial data and register an events queue. Clients can
pass the `presence_history_limit_days` param here.
- `/users/me/presence` - this endpoint is currently used by clients to
update their presence status and fetch incremental data, making the new
functionality not particularly useful here. However, we still add the
new `history_limit_days` param here, in case in the future clients
transition to using this also for the initial presence data fetch.
- `/` - used when opening the webapp. Naturally, params aren't passed
here, so the server just assumes a value from
`settings.PRESENCE_HISTORY_LIMIT_DAYS_FOR_WEB_APP` and returns
information about this default value in page_params.
2024-09-10 13:15:35 -07:00
..
actions zerver: Rename some message_type variables to recipient_type. 2024-09-10 12:50:28 -07:00
data_import mattermost: Handle duplicate dm-groups. 2024-09-09 12:05:28 -07:00
integration_fixtures/nagios
lib presence: Add history_limit_days param to the API. 2024-09-10 13:15:35 -07:00
management audit-log: Move stream/channel event types to AuditLogEventType enum. 2024-09-09 11:50:13 -07:00
migrations zerver: Rename some message_type variables to recipient_type. 2024-09-10 12:50:28 -07:00
models users: Soften assumptions that all bots have owners. 2024-09-09 11:55:46 -07:00
openapi presence: Add history_limit_days param to the API. 2024-09-10 13:15:35 -07:00
tests presence: Add history_limit_days param to the API. 2024-09-10 13:15:35 -07:00
tornado events: Migrate to typed_endpoint. 2024-07-31 17:10:06 -07:00
transaction_tests ruff: Bump target-version from py38 to py310. 2024-07-13 22:28:22 -07:00
views presence: Add history_limit_days param to the API. 2024-09-10 13:15:35 -07:00
webhooks webhooks: Fix strange joining code in greenhous webhook. 2024-09-03 12:31:36 -07:00
worker upload: Download files with their original names. 2024-09-09 12:40:17 -07:00
__init__.py
apps.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
context_processors.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
decorator.py analytics: Migrate to @typed_endpoint. 2024-08-26 08:57:49 -07:00
filters.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
forms.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
logging_handlers.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
middleware.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
signals.py ruff: Bump target-version from py38 to py310. 2024-07-13 22:28:22 -07:00