Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
api-docs: Update GET /messages for channel.
Lauryn Menardaea4216970ed
diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yamlindex 2e5adae1cb6..6d68c3deb5d 100644--- a/zerver/openapi/zulip.yaml+++ b/zerver/openapi/zulip.yaml@@ -6097,8 +6097,8 @@ paths:clients, backup scripts, etc.Note that a user's message history does not contain messages sent to- streams before they [subscribe](/api/subscribe), and newly created- bot users are not usually subscribed to any streams.+ channels before they [subscribe](/api/subscribe), and newly created+ bot users are not usually subscribed to any channels.By specifying a [narrow filter](/api/get-messages#parameter-narrow),you can use this endpoint to fetch the messages matching any search@@ -6184,24 +6184,24 @@ paths:The narrow where you want to fetch the messages from. See how to[construct a narrow](/api/construct-narrow).- Note that many narrows, including all that lack a `stream`- or `streams` operator, search the user's personal message+ Note that many narrows, including all that lack a `channel`, `channels`,+ `stream`, or `streams` operator, search the user's personal messagehistory. See [searching sharedhistory](/help/search-for-messages#searching-shared-history)for details.- For example, if you would like to fetch messages from all public streams instead+ For example, if you would like to fetch messages from all public channels insteadof only the user's message history, then a specific narrow for- messages sent to all public streams can be used:- `{"operator": "streams", "operand": "public"}`.+ messages sent to all public channels can be used:+ `{"operator": "channels", "operand": "public"}`.Newly created bot users are not usually subscribed to any- streams, so bots using this API should either be- subscribed to appropriate streams or use a shared history+ channels, so bots using this API should either be+ subscribed to appropriate channels or use a shared historysearch narrow with this endpoint.**Changes**: In Zulip 9.0 (feature level 250), narrows gained support- for two new filters related to stream messages: `channel` and `channels`;+ for two new filters related to channel messages: `channel` and `channels`;which are aliases for (and return the same results as) the `stream` and`streams` filters respectively.@@ -6214,8 +6214,8 @@ paths:`dm-including`; replacing and deprecating `is:private`, `pm-with` and`group-pm-with` respectively.- In Zulip 2.1.0, added support for using user/stream IDs when- constructing narrows for a message's sender, its stream and/or+ In Zulip 2.1.0, added support for using user/channel IDs when+ constructing narrows for a message's sender, its channel and/orits recipient(s).content:application/json:@@ -6246,7 +6246,7 @@ paths:minItems: 2maxItems: 2default: []- example: [{"operand": "Denmark", "operator": "stream"}]+ example: [{"operand": "Denmark", "operator": "channel"}]- $ref: "#/components/parameters/ClientGravatar"- name: apply_markdownin: querydiff --git a/zerver/tests/test_openapi.py b/zerver/tests/test_openapi.pyindex 37efdc99dd1..4a96d3dc1d5 100644--- a/zerver/tests/test_openapi.py+++ b/zerver/tests/test_openapi.py@@ -913,7 +913,7 @@ class TestCurlExampleGeneration(ZulipTestCase):" --data-urlencode include_anchor=false \\"," --data-urlencode num_before=4 \\"," --data-urlencode num_after=8 \\",- ' --data-urlencode \'narrow=[{"operand": "Denmark", "operator": "stream"}]\' \\',+ ' --data-urlencode \'narrow=[{"operand": "Denmark", "operator": "channel"}]\' \\'," --data-urlencode client_gravatar=false \\"," --data-urlencode apply_markdown=false \\"," --data-urlencode use_first_unread_anchor=true",@@ -988,7 +988,7 @@ class TestCurlExampleGeneration(ZulipTestCase):" --data-urlencode include_anchor=false \\"," --data-urlencode num_before=4 \\"," --data-urlencode num_after=8 \\",- ' --data-urlencode \'narrow=[{"operand": "Denmark", "operator": "stream"}]\' \\',+ ' --data-urlencode \'narrow=[{"operand": "Denmark", "operator": "channel"}]\' \\'," --data-urlencode use_first_unread_anchor=true","```",]