From 32d5b4fe3eae40c3cefcdc29c83074827f6a903f Mon Sep 17 00:00:00 2001 From: Lauryn Menard Date: Fri, 12 Apr 2024 13:46:36 +0200 Subject: [PATCH] api-docs: Document the "channel" and "channels" search/narrow operators. Documents the addition of "channel" and "channels" as operators for search/narrow filters, noting that they are aliases of the "stream" and "streams" operators. This change does not yet deprecate the "stream" and "streams" operators. Part of stream to channel rename project. --- api_docs/changelog.md | 11 +++++++++++ api_docs/construct-narrow.md | 7 +++++++ zerver/openapi/zulip.yaml | 28 +++++++++++++++++++++++----- 3 files changed, 41 insertions(+), 5 deletions(-) diff --git a/api_docs/changelog.md b/api_docs/changelog.md index 3f7a281717..d0a02c2092 100644 --- a/api_docs/changelog.md +++ b/api_docs/changelog.md @@ -20,6 +20,17 @@ format used by the Zulip server that they are interacting with. ## Changes in Zulip 9.0 +**Feature level 250** + +* [`GET /messages`](/api/get-messages), + [`GET /messages/matches_narrow`](/api/check-messages-match-narrow), + [`POST /messages/flags/narrow`](/api/update-message-flags-for-narrow), + [`POST /register`](/api/register-queue): + Added support for two [search/narrow filters](/api/construct-narrow) + related to stream messages: `channel` and `channels`. The `channel` + operator is an alias for the `stream` operator. The `channels` + operator is an alias for the `streams` operator. + **Feature level 249** * [`GET /messages`](/api/get-messages), [`GET diff --git a/api_docs/construct-narrow.md b/api_docs/construct-narrow.md index b7d34d7f72..72c5694381 100644 --- a/api_docs/construct-narrow.md +++ b/api_docs/construct-narrow.md @@ -51,6 +51,13 @@ important optimization when fetching messages in certain cases (e.g. when [adding the `read` flag to a user's personal messages](/api/update-message-flags-for-narrow)). +**Changes**: In Zulip 9.0 (feature level 250), support was added for +two filters related to stream messages: `channel` and `channels`. The +`channel` operator is an alias for the `stream` operator. The `channels` +operator is an alias for the `streams` operator. Both `channel` and +`channels` return the same exact results as `stream` and `streams` +respectively. + **Changes**: In Zulip 9.0 (feature level 249), narrows gained support for a new filter `has:reaction`. This allows clients to retrieve only messages that have at least one reaction. diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yaml index 9359cd5ad3..e85d061980 100644 --- a/zerver/openapi/zulip.yaml +++ b/zerver/openapi/zulip.yaml @@ -6189,7 +6189,12 @@ paths: subscribed to appropriate streams or use a shared history search narrow with this endpoint. - **Changes**: In Zulip 9.0 (feature level 249), added new `has:reaction` + **Changes**: In Zulip 9.0 (feature level 250), narrows gained support + for two new filters related to stream messages: `channel` and `channels`; + which are aliases for (and return the same results as) the `stream` and + `streams` filters respectively. + + In Zulip 9.0 (feature level 249), added new `has:reaction` filter, matching messages with at least one emoji reaction. In Zulip 7.0 (feature level 177), narrows gained support @@ -7062,7 +7067,12 @@ paths: optimization. Including that filter takes advantage of the fact that the server has a database index for unread messages. - **Changes**: In Zulip 9.0 (feature level 249), added new `has:reaction` + **Changes**: In Zulip 9.0 (feature level 250), narrows gained support + for two new filters related to stream messages: `channel` and `channels`; + which are aliases for (and return the same results as) the `stream` and + `streams` filters respectively. + + In Zulip 9.0 (feature level 249), added new `has:reaction` filter, matching messages with at least one emoji reaction. In Zulip 7.0 (feature level 177), narrows gained support @@ -7489,7 +7499,12 @@ paths: A structure defining the narrow to check against. See how to [construct a narrow](/api/construct-narrow). - **Changes**: In Zulip 9.0 (feature level 249), added new `has:reaction` + **Changes**: In Zulip 9.0 (feature level 250), narrows gained support + for two new filters related to stream messages: `channel` and `channels`; + which are aliases for (and return the same results as) the `stream` and + `streams` filters respectively. + + In Zulip 9.0 (feature level 249), added new `has:reaction` filter, matching messages with at least one emoji reaction. In Zulip 7.0 (feature level 177), narrows gained support @@ -21368,9 +21383,12 @@ components: See the `all_public_streams` parameter for how to process all public stream messages in an organization. - Defaults to `[]`. + **Changes**: In Zulip 9.0 (feature level 250), narrows gained support + for two new filters related to stream messages: `channel` and `channels`; + which are aliases for (and return the same results as) the `stream` and + `streams` filters respectively. - **Changes**: In Zulip 9.0 (feature level 249), added new `has:reaction` + In Zulip 9.0 (feature level 249), added new `has:reaction` filter, matching messages with at least one emoji reaction. In Zulip 7.0 (feature level 177), narrows gained support