Commit Graph

587 Commits

Author SHA1 Message Date
Alya Abbott
edbcce5f00 docs: Redirect incoming webhooks articles from API docs to RTD.
The content of these API documentation pages was added to RTD in
commit 73f374070c.

Co-authored-by: Lauryn Menard <lauryn@zulip.com>
2026-01-07 15:30:51 -08:00
Sahil Batra
29b44932ba streams: Check permission to post messages to access channel email.
This commit updates the API endpoint to get channel's email address
to check if user has permission to post to that channel and raise
an error if user does not have that permission.
2026-01-06 11:19:16 -08:00
saiyam0211
47f9e88e59 bots: Allow admins/owners to change bot short_name.
Previously, once a bot was created, its email address was immutable.
This was problematic when organizations wanted to rename bots to
better reflect their purpose or fix naming mistakes. The only
workaround was to deactivate the old bot and create a new one,
losing the bot's message history and requiring updates to all
integrations.

This change allows organization administrators and owners to edit
a bot's short_name through the bot edit modal, which updates the
bot's email address accordingly. The new email is validated to
ensure it follows the correct format and isn't already in use.
Users are warned via hint text that integrations will need to be
updated to use the new email address.

Fixes #34604.
2026-01-05 18:51:59 -08:00
kumbhar-sarthak
27cb57a604 get_messages: Add mentions operator for filtering user mentions.
This commit introduces server support for a new `mentions` narrow
operator that allows users to filter messages mentioning a specific
user by their user ID or email. Documentation has been updated to
reflect the new operator syntax.
2026-01-05 18:15:44 -08:00
Niloth P
c919785a18 webhooks: Make URL_TEMPLATE optional in test classes.
Added the most common URL_TEMPLATE as the default value.
2026-01-05 09:56:00 -08:00
Niloth P
83d0946b34 webhooks: Remove CHANNEL_NAME from test classes.
Use the integration name as the default channel name for all
integrations.

The channel name is only used for tests, so the exact string used for
the channel name does not matter, we only want to assert that the
desired and expected names match.
2026-01-05 09:56:00 -08:00
Niloth P
97efb066eb webhooks: Make WEBHOOK_DIR_NAME optional in test classes.
By inferring it from the module of the caller.

Removed it from all the integrations that use default WEBHOOK_DIR_NAME
values.
2026-01-05 09:56:00 -08:00
Shubham Padia
fec8462f79 narrow: Add ability to anchor on a date.
Added another type of anchor `date` along with the `anchor_date`
parameter to fetch messages anchored to a specific date/time.
If a date is provided, the datetime is set to midnight (00:00)
on that day in UTC. If no timezone is provided, UTC is assumed.
If no message has been sent on or after the `anchor_date`, we
fall back to using the `newest` anchor value.
2026-01-02 15:41:17 -08:00
Niloth P
c499d558f6 webhooks: Rename a common.py function to get_event_header.
validate_extract_webhook_http_header -> get_event_header.
2026-01-02 14:31:59 -08:00
Aditya Kumar Kasaudhan
e49f0ded86 user_settings: Add backend for admin to modify user settings.
This commit adds backend support allowing admins to change non-
sensitive settings for other users.

Fixes part of #31474.
2026-01-02 08:30:59 -08:00
Vector73
69f52b3b3c attachments: Change timestamp format to normal UNIX timestamp.
The `create_time` and `date_sent` fields in `attachment` objects will now
return UNIX timestamps in seconds. Previously, these values were returned in
milliseconds.

Co-authored-by: orientor <orientorrenovare@gmail.com>
2025-12-30 12:31:46 -08:00
Lauryn Menard
82f2613880 api-docs: Split outgoing webhook payload into a separate article.
In preparation for moving the majority of the outgoing webhook
documentation to the help center, we move the payload content,
which is partially generated from zerver/openapi/zulip.yaml, to
a separate article in the API documentation.
2025-12-12 15:18:50 -08:00
Lauryn Menard
30d5f6e74b api-docs: Revise outgoing webhooks API documentation.
Adds an instruction block for creating an outgoing webhook bot
user. Makes some general revisions to the order of the content
on the page, and adds some header links to help with navigating
the content.

Fixes #36601.
2025-12-12 15:18:14 -08:00
apoorvapendse
5ba158a13d api: Use a common rating value for Tenor and GIPHY.
It is important to note that the database column
is still called `giphy_rating` but is used as
a common rating value for the GIPHY and Tenor
integrations.

I also renamed `giphy_rating_options` to
`gif_rating_options` so that it makes more sense
and reiterates on the fact that both the integrations
have a common rating value.

Increments API feature level to 442.
2025-12-12 12:27:27 -08:00
apoorvapendse
849e3ea510 gifs: Introduce the Tenor GIF picker.
This adds the new Tenor GIF picker in Zulip.

In case both the API keys and other credentials
for Tenor and GIPHY integrations are set, we
show the Tenor picker instead of the GIPHY picker
instead of showing two GIF picker buttons.

We currently use a hardcoded content filter
for Tenor.
The eventual goal with this is to use the existing
ids for the ratings of both integrations in
`realm_giphy_rating` as a common rating for GIFs.

Discussion: https://chat.zulip.org/#narrow/channel/101-design/topic/GIF.20picker.20service/near/2306084

Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
2025-12-12 12:13:48 -08:00
Prakhar Pratyush
1081abbf91 api_docs: Document payloads sent to the bouncer, FCM, and APNs.
This commit extends `/api/mobile-notifications` to document
sample data:
* sent by a self-hosted server to the bouncer
* sent by the bouncer to FCM
* sent by the bouncer to APNs
as a part of sending E2EE push notifications.

Signed-off-by: Prakhar Pratyush <prakhar@zulip.com>
2025-12-12 10:27:49 -08:00
PieterCK
c065186f3b integrations: Rename url_option MAPPING to CHANNEL_MAPPING.
This renames `PresetUrlOption.MAPPING` to `CHANNEL_MAPPING` to avoid
confusion with an option that maps Slack channels to Zulip topics.
2025-12-09 09:53:39 -08:00
Tim Abbott
bcf67fc0f8 api_docs: Add initial article on Zulip URLs. 2025-12-09 09:25:56 -08:00
Niloth P
d3e01266a9 integrations: Rename webhooks to "incoming" webhook integrations.
For clarifying that outgoing webhooks are handled separately.

String replacements:
- "WEBHOOK_INTEGRATIONS" -> "INCOMING_WEBHOOK_INTEGRATIONS"
- "WebhookIntegration" -> "IncomingWebhookIntegration"
2025-12-08 12:49:25 -08:00
Tim Abbott
3b70a1ed26 api: Increment API feature level to 441. 2025-12-05 15:26:35 -08:00
Saubhagya Patel
55ec705b92 streams: Add group based setting to control new topic creation.
Fixes part of #19642.
2025-12-05 14:55:10 -08:00
Evy Kassirer
7d5935bb74 channels: Add API endpoint to fetch a user's subscriptions.
For #35341, we will need to be able to efficiently ask the server for
an individual user's channel subscriptions.
2025-12-05 11:30:19 -08:00
Tim Abbott
272b0290dc api: Increment API feature level to 439.
Co-authored-by: Tim Abbott <tabbott@zulip.com>
2025-12-04 18:19:06 -08:00
Aditya Kumar Kasaudhan
45a86dd73a user_settings: Remove legacy notification and display settings.
This commit removes the `notification_settings_legacy` and
`display_settings_legacy` fields, which were deprecated and
are no longer used by modern clients. Cleaning them up simplifies
the codebase and reduces complexity for future changes.
2025-12-04 18:19:06 -08:00
Lauryn Menard
6066b43a3a api-docs: Update instructions for changes to bot management panel. 2025-12-03 13:08:18 -08:00
Shubham Padia
3d1707adb0 realm: Add owner_full_content_access to state_data. 2025-12-01 12:26:04 -08:00
17AnuragMishra
72fa1ce8c0 message_edit_history: Replace loading spinners with deleted file placeholder.
Some checks failed
API Documentation Update Check / check-feature-level-updated (push) Has been cancelled
Code scanning / CodeQL (push) Has been cancelled
Zulip production suite / Ubuntu 22.04 production build (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:bookworm, true, false, Debian 12 (Python 3.11, backend + documentation), bookworm) (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:jammy, false, true, Ubuntu 22.04 (Python 3.10, backend + frontend), jammy) (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:noble, false, false, Ubuntu 24.04 (Python 3.12, backend), noble) (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:trixie, false, false, Debian 13 (Python 3.13, backend), trixie) (push) Has been cancelled
API Documentation Update Check / notify-if-api-docs-changed (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:bookworm, --test-custom-db, Debian 12 production install with custom db name and user, bookworm) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:jammy, , Ubuntu 22.04 production install and PostgreSQL upgrade with pgroonga, jammy) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:noble, , Ubuntu 24.04 production install, noble) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:trixie, , Debian 13 production install, trixie) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:bookworm-7.0, 7.0 Version Upgrade, bookworm) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:bookworm-8.0, 8.0 Version Upgrade, bookworm) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:jammy-6.0, 6.0 Version Upgrade, jammy) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:noble-10.0, 10.0 Version Upgrade, noble) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:noble-9.0, 9.0 Version Upgrade, noble) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:trixie-11.0, 11.0 Version Upgrade, trixie) (push) Has been cancelled
When an image is deleted before thumbnailing completes, the edit history shows
a loading spinner forever because the old rendered HTML contains a loading
placeholder that never gets updated. Replace these loading spinners with
the deleted file placeholder image and set the alt text to
"This file does not exist or has been deleted."
to make it usable for any deleted file, not just images.

Fixes #36487.
2025-11-30 16:54:31 -08:00
Vector73
dec9fd3908 api: Fix sending fake users when fetching inaccessible users via API.
Previously, in the `GET /users` API suite, `user_list_incomplete=False` was
being incorrectly used when fetching users which resulted in the server
returning fake users for guest users that lack permission to see all users
in the organization. This commit fixes this bug.

Fixes #36559.
2025-11-25 15:48:20 -08:00
Karl Stolley
15f87a7b8a emoji: Render large emoji on emoji-only messages.
Fixes #15390
2025-11-21 16:10:50 -08:00
Karl Stolley
272a9e2e36 api_docs: Document emoji in message formatting docs.
With more details from tabbott.
2025-11-21 16:10:47 -08:00
PieterCK
6e73430060 api: Add server_report_message_types to realm. 2025-11-21 12:02:44 -08:00
Vector73
8f88f3d8bb settings: Add realm setting to disable channel event messages.
Adds a realm setting `send_channel_events_messages` to disable
channel event messages.

Fixes #27928.
2025-11-21 11:58:02 -08:00
Alya Abbott
dd09539926 api docs: Remove outdated "(beta)" label.
Some checks failed
API Documentation Update Check / check-feature-level-updated (push) Has been cancelled
Code scanning / CodeQL (push) Has been cancelled
Zulip production suite / Ubuntu 22.04 production build (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:bookworm, true, false, Debian 12 (Python 3.11, backend + documentation), bookworm) (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:jammy, false, true, Ubuntu 22.04 (Python 3.10, backend + frontend), jammy) (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:noble, false, false, Ubuntu 24.04 (Python 3.12, backend), noble) (push) Has been cancelled
Zulip CI / ${{ matrix.name }} (zulip/ci:trixie, false, false, Debian 13 (Python 3.13, backend), trixie) (push) Has been cancelled
API Documentation Update Check / notify-if-api-docs-changed (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:bookworm, --test-custom-db, Debian 12 production install with custom db name and user, bookworm) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:jammy, , Ubuntu 22.04 production install and PostgreSQL upgrade with pgroonga, jammy) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:noble, , Ubuntu 24.04 production install, noble) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:trixie, , Debian 13 production install, trixie) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:bookworm-7.0, 7.0 Version Upgrade, bookworm) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:bookworm-8.0, 8.0 Version Upgrade, bookworm) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:jammy-6.0, 6.0 Version Upgrade, jammy) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:noble-10.0, 10.0 Version Upgrade, noble) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:noble-9.0, 9.0 Version Upgrade, noble) (push) Has been cancelled
Zulip production suite / ${{ matrix.name }} (zulip/ci:trixie-11.0, 11.0 Version Upgrade, trixie) (push) Has been cancelled
2025-11-14 16:48:30 -08:00
Alya Abbott
9fa9f9fbc1 api docs: Clean up running-bots intro and ending. 2025-11-14 14:23:58 -08:00
Alya Abbott
9ae317f5fb api docs: Tweak intros. 2025-11-14 14:23:58 -08:00
Alya Abbott
071638a33c api docs: Clean up and simplify writing bots documentation. 2025-11-14 14:23:58 -08:00
Alya Abbott
6d41fdeb3f api docs: Move headings on new pages one level up. 2025-11-14 14:23:58 -08:00
Alya Abbott
7cf3dcaa30 api docs: Split writing interactive bots page into three pages. 2025-11-14 14:23:58 -08:00
Niloth P
049e2fb5ac integrations: Make screenshot_configs a field in Integration class.
Previously, we maintained separate registeries for the screenshot
configurations - `WEBHOOK_SCREENSHOT_CONFIG`,
`FIXTURELESS_SCREENSHOT_CONFIG`, `DOC_SCREENSHOT_CONFIG`. Now, all
integration-related configuration is in a single registry
`INTEGRATIONS`.

Updated all mentions of DOC_SCREENSHOT_CONFIG in the docs.
2025-11-14 11:03:02 -08:00
Sahil Batra
9c571c6f67 users: Use is_imported_stub flag for imported users.
For users imported from other chat applications, is_imported_stub flag
is set to True until the user logs in for the first time.

This is preparation for #26950 to add a separated imported users tab
in "Users" settings panel.
2025-11-10 14:03:52 -08:00
Shubham Padia
40dedace08 integrations: Change URL scheme for categories and /doc/ page.
We redirect existing URLs to the new URLs. We want to use
`/integrations/category/{category_slug}` for categories and
`/integrations/{integration_name}` instead of
`/integrations/doc/{integration_name}` for individual integrations page.
2025-11-07 13:29:34 -08:00
Prakhar Pratyush
7ebdca52e8 push_notification: Use symmetric cryptography to encrypt notifications.
Earlier we were using asymmetric cryptography.

We were using libsodium "sealed box" which is unauthenticated
by design. The sender could have been anyone, as long as they
had the receiver's public key.

We had authenticity but only because the device's public key
is effectively kept secret. We were relying on the public key
being kept secret - which was a security risk. It's easy to
end up with code somewhere that treats the public key as public,
and can leak it.

This commit makes changes to use symmetric cryptography -
libsodium's `crypto_secretbox_easy` which provides authenticated
encryption using XSalsa20 and Poly1305.

`push_public_key` is replaced with `push_key` and it represents
a base64 encoded 33-byte value: one-byte prefix followed by 32-byte
secret key generated by the client.

The prefix `0x31` indicates the current cryptosystem in use.
It allows for future extensibility - for example, `0x32` could denote
a different cryptosystem.

Involves API changes to replace the `push_public_key` parameter
with `push_key` in `/api/v1/mobile_push/register` endpoint.

Signed-off-by: Prakhar Pratyush <prakhar@zulip.com>
2025-11-07 12:00:39 -08:00
Lauryn Menard
39fae1896b api-docs: Revise descriptions for user channel folder display settings.
Revises the descriptions for web_left_sidebar_show_channel_folders
and web_inbox_show_channel_folders, as well as the API changelog
entries for when those two settings were introduced (feature levels
411 and 431).
2025-11-06 10:32:25 -08:00
Evy Kassirer
7d7d4f58d3 inbox_ui: Make it possible to disable channel folders.
Part of #35951.
2025-11-05 16:19:05 -08:00
PieterCK
a584b977db export_consent: Include users email visibility policy in the response.
This updates the `/export/realm/consents` API endpoint to also include
`email_address_visibility` field for each item in the `export_consents`
object.

This is a prep commit to add a warnings in the "Start export?"
confirmation modal for when there are no usable owner account.
2025-11-04 18:15:36 -08:00
Prakhar Pratyush
7ebaa9f4e4 push_notifications: Replace pm_users field with recipient_user_ids.
The encrypted push notification payload previously included a `pm_users`
field for group direct messages.

This commit replaces the `pm_users` field with `recipient_user_ids`.
(new name to migrate from the old "private" keyword)

It's a sorted array of all user IDs participating in a 1:1 or group DM
conversation, including both `user_id` and `sender_id`.

* Previously, `pm_users` was included only for group DMs;
`recipient_user_ids` is present for both 1:1 and group DM conversations.

* The old `pm_users` field was a string containing a comma-separated
list of sorted user IDs. `recipient_user_ids` has a more structured
array format.

Signed-off-by: Prakhar Pratyush <prakhar@zulip.com>
2025-11-04 12:21:40 -08:00
Shubham Padia
3057f4bc6d users: Send peer_remove for archived streams as well on deactivation.
Users are removed from archived streams as well on deactivation. Since
archived stream subscriber list is also visible in channel settings, we
should send peer_remove for it as well.
2025-11-04 11:14:59 -08:00
Alya Abbott
ba5340c235 help: Remove outdated "Set up integrations" page.
An updated version of the same content already exists on the
"Integrations overview" page.
2025-11-03 15:54:45 -08:00
Alex Vandiver
5c2b0d91d5 rate_limit: Additionally limit to 2000 authenticated requests per hour. 2025-10-27 16:22:13 -07:00
Alex Vandiver
d84ba0aba2 api_docs: Describe how to recognize thumbails. 2025-10-23 14:16:00 -07:00