zulip/zerver/views
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
..
development python: Simplify with str.removeprefix, str.removesuffix. 2024-09-03 12:30:16 -07:00
__init__.py
alert_words.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
attachments.py attachments: Correct attachment_id type from string to integer. 2023-10-22 17:06:34 -07:00
auth.py auth: Migrate to @typed_endpoint. 2024-08-30 16:56:14 -07:00
compatibility.py django: Use HttpRequest.headers. 2022-05-13 20:42:20 -07:00
custom_profile_fields.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
digest.py mypy: Fix most AnonymousUser type errors. 2021-07-24 14:55:46 -07:00
documentation.py python: Simplify with str.removeprefix, str.removesuffix. 2024-09-03 12:30:16 -07:00
drafts.py ruff: Fix UP006 Use `list` instead of `List` for type annotation. 2024-07-13 22:28:22 -07:00
email_mirror.py zerver: Migrate some files to typed_endpoint. 2024-07-20 15:46:48 -07:00
errors.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
events_register.py presence: Add history_limit_days param to the API. 2024-09-10 13:15:35 -07:00
health.py views: Add a /health healthcheck endpoint. 2023-09-20 09:53:59 -07:00
home.py home: Add rel=dns-prefetch to Gravatar and any Zulip avatar host. 2024-08-16 14:33:25 -07:00
invite.py zerver: Migrate some files to typed_endpoint. 2024-07-20 15:46:48 -07:00
message_edit.py attachments: Return a list of removed attachments while editing. 2024-09-06 11:40:51 -07:00
message_fetch.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
message_flags.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
message_send.py python: Simplify with str.removeprefix, str.removesuffix. 2024-09-03 12:30:16 -07:00
muted_users.py bots: Fix muting of cross realm bots. 2023-11-27 16:16:23 -08:00
onboarding_steps.py onboarding: Migrate to typed_endpoint. 2024-06-14 11:24:36 -07:00
presence.py presence: Add history_limit_days param to the API. 2024-09-10 13:15:35 -07:00
push_notifications.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
reactions.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
read_receipts.py requirements: Upgrade Python requirements. 2024-06-27 15:31:43 -07:00
realm.py endpoints: Modify comments mentioning has_request_variables and REQ. 2024-09-05 16:02:12 -07:00
realm_domains.py realm: Migrate smaller files to typed_endpoint. 2024-07-15 16:49:32 -07:00
realm_emoji.py realm: Migrate smaller files to typed_endpoint. 2024-07-15 16:49:32 -07:00
realm_export.py audit-log: Move realm event types to AuditLogEventType enum. 2024-09-09 11:50:13 -07:00
realm_icon.py upload: Pass down content-type of realm icon/logo to backend. 2024-07-11 07:31:39 -07:00
realm_linkifiers.py realm: Migrate smaller files to typed_endpoint. 2024-07-15 16:49:32 -07:00
realm_logo.py realm: Migrate smaller files to typed_endpoint. 2024-07-15 16:49:32 -07:00
realm_playgrounds.py realm: Migrate smaller files to typed_endpoint. 2024-07-15 16:49:32 -07:00
registration.py zerver: Migrate some files to typed_endpoint. 2024-07-20 15:46:48 -07:00
report.py csp_violations: Migrate has_request_variables to typed_endpoint. 2024-03-08 11:26:00 -08:00
scheduled_messages.py scheduled_messages: Migrate to typed_endpoint. 2024-08-20 10:03:22 -07:00
sentry.py ruff: Fix UP038 Use `X | Y` in `isinstance` call instead of `(X, Y)`. 2024-07-13 22:28:22 -07:00
storage.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
streams.py create stream: Bulk conversion of principals to UserProfiles. 2024-08-16 17:46:19 -07:00
submessage.py zerver: Migrate several small files to typed_endpoint. 2024-07-05 16:18:57 -07:00
thumbnail.py thumbnail: Do not Camo old thumbor URLs; serve images directly. 2024-07-24 16:04:34 -07:00
typing.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
unsubscribe.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
upload.py upload: Preserve content-type from upload for local-file storage. 2024-09-09 12:40:17 -07:00
user_groups.py user_groups: Add support to update can_manage_group setting. 2024-08-20 09:28:05 -07:00
user_settings.py endpoints: Modify comments mentioning has_request_variables and REQ. 2024-09-05 16:02:12 -07:00
user_topics.py validators: Use cleaner syntax for AfterValidator. 2024-07-15 16:49:32 -07:00
users.py users: Change bot owner only if needed. 2024-07-17 10:07:51 -07:00
video_calls.py video_calls: Migrate to typed_endpoint. 2024-07-31 17:10:06 -07:00
zephyr.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00