Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

api-docs: Update `/set-typing-status` endpoint documentation.

Lauryn Menardaa5536fe3046
diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yaml
index 6dd0baea28c..c876ff8b97e 100644
--- a/zerver/openapi/zulip.yaml
+++ b/zerver/openapi/zulip.yaml
@@ -13712,22 +13712,26 @@ paths:
Clients implementing Zulip's typing notifications protocol should work as follows:
- - Send a request to this endpoint with `op="start"` when a user starts typing a message,
- and also every `TYPING_STARTED_WAIT_PERIOD=10` seconds that the user continues to
- actively type or otherwise interact with the compose UI (E.g. interacting with the
+ - Send a request to this endpoint with `op = "start"` when a user starts typing a message,
+ and also every `TYPING_STARTED_WAIT_PERIOD = 10` seconds that the user continues to
+ actively type or otherwise interact with the compose UI (e.g. interacting with the
compose box emoji picker).
- - Send a request to this endpoint with `op="stop"` when a user pauses using the
- compose UI for at least `TYPING_STOPPED_WAIT_PERIOD=5` seconds or cancels
+ - Send a request to this endpoint with `op = "stop"` when a user pauses using the
+ compose UI for at least `TYPING_STOPPED_WAIT_PERIOD = 5` seconds or cancels
the compose action (if it had previously sent a "start" operation for that
compose action).
- Start displaying "Sender is typing" for a given conversation when the client
- receives an `op="start"` event from the [events API](/api/get-events).
- - Continue displaying "Sender is typing" until they receive an `op="stop"` event
- from the [events API](/api/get-events) or `TYPING_STARTED_EXPIRY_PERIOD=15`
- seconds have passed without a new `op="start"` event for that conversation.
- - Clients that support displaying stream typing notifications (new in Zulip 4.0)
- should indicate they support processing stream typing events via the
- `stream_typing_notifications` in the `client_capabilities` parameter to `/register`.
+ receives an `op = "start"` event from the [`GET /events`](/api/get-events#typing-start)
+ endpoint.
+ - Continue displaying "Sender is typing" until they receive an `op = "stop"` event
+ from the [`GET /events`](/api/get-events#typing-stop) endpoint or
+ `TYPING_STARTED_EXPIRY_PERIOD = 15` seconds have passed without a new `op = "start"`
+ event for that conversation.
+ - Support for displaying stream typing notifications was new in Zulip 4.0
+ (feature level 58). Clients should indicate they support processing stream typing
+ events via the `stream_typing_notifications` value in the `client_capabilities`
+ parameter to [`POST /register`](/api/register-queue#parameter-client_capabilities)
+ endpoint.
This protocol is designed to allow the server-side typing notifications implementation
to be stateless while being resilient; network failures cannot result in a user being
@@ -13747,6 +13751,9 @@ paths:
in: query
description: |
Type of the message being composed.
+
+ **Changes**: New in Zulip 4.0 (feature level 58). Previously, typing
+ notifications were only for private messages.
schema:
type: string
enum:
@@ -13757,7 +13764,7 @@ paths:
- name: op
in: query
description: |
- Whether the user has started (`start`) or stopped (`stop`) to type.
+ Whether the user has started (`"start"`) or stopped (`"stop"`) typing.
schema:
type: string
enum:
@@ -13768,14 +13775,18 @@ paths:
- name: to
in: query
description: |
- For 'private' type it is the user_ids of the recipients of the message being typed.
+ For `"private"` type it is the user_ids of the recipients of the message being typed.
Send a JSON-encoded list of user_ids. (Use a list even if there is only one
recipient.)
- For 'stream' type it is a single element list containing ID of stream in
+ For `"stream"` type it is a single element list containing ID of stream in
which the message is being typed.
- **Changes**: Before Zulip 2.0, this parameter accepted only a JSON-encoded
+ **Changes**: Support for typing notifications for stream messages
+ is new in Zulip 4.0 (feature level 58). Previously, typing
+ notifications were only for private messages.
+
+ Before Zulip 2.0, this parameter accepted only a JSON-encoded
list of email addresses. Support for the email address-based format was
removed in Zulip 3.0 (feature level 11).
content:
@@ -13789,8 +13800,11 @@ paths:
- name: topic
in: query
description: |
- Topic to which message is being typed. Required for the 'stream' type.
- Ignored in case of 'private' type.
+ Topic to which message is being typed. Required for the `"stream"` type.
+ Ignored in the case of `"private"` type.
+
+ **Changes**: New in Zulip 4.0 (feature level 58). Previously, typing
+ notifications were only for private messages.
schema:
type: string
example: typing notifications