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: Add local_message_id field to message event documentation.

Lauryn Menard00be02626863
diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yaml
index 776a16b85ec..fc0ed5dc866 100644
--- a/zerver/openapi/zulip.yaml
+++ b/zerver/openapi/zulip.yaml
@@ -926,6 +926,21 @@ paths:
[message-flags]: /api/update-message-flags#available-flags
items:
type: string
+ local_message_id:
+ type: string
+ description: |
+ For clients supporting
+ [local echo](https://zulip.readthedocs.io/en/latest/subsystems/sending-messages.html#local-echo).
+ Only present if [`local_id`](/api/send-message#parameter-local_id) and
+ [`queue_id`](/api/send-message#parameter-queue_id) were passed by the
+ client when the message was sent to the server.
+
+ The same unique string-format identifier chosen by the client to identify
+ the locally echoed message (which was the value passed as the `local_id`
+ parameter). This lets the client know unambiguously that it should
+ replace the locally echoed message, rather than adding this new message
+ (which would be correct if the user had sent the new message from another
+ device).
additionalProperties: false
example:
{
@@ -8456,21 +8471,27 @@ paths:
description: |
For clients supporting
[local echo](https://zulip.readthedocs.io/en/latest/subsystems/sending-messages.html#local-echo),
- the [event queue](/api/register-queue)
- ID for the client. If passed, `local_id` is required. If the message is
- successfully sent, the server will include `local_id` in the `message` event
- that the client with this `queue_id` will receive notifying it of the new message
- via [`GET /events`](/api/get-events). This lets the client know unambiguously
- that it should replace the locally echoed message, rather than adding this new
- message (which would be correct if the user had sent the new message from another
- device).
+ the [event queue](/api/register-queue) ID for the client.
+
+ If passed, `local_id` is required.
+
+ If the message is successfully sent, the server will include
+ `local_message_id` in the [`message` event](/api/get-events#message) that
+ the client with this `queue_id` will receive.
example: "fb67bf8a-c031-47cc-84cf-ed80accacda8"
local_id:
type: string
description: |
- For clients supporting local echo, a unique string-format identifier
- chosen freely by the client; the server will pass it back to the client without
- inspecting it, as described in the `queue_id` description.
+ For clients supporting
+ [local echo](https://zulip.readthedocs.io/en/latest/subsystems/sending-messages.html#local-echo),
+ a unique string-format identifier chosen freely by the client.
+
+ If passed, `queue_id` is required.
+
+ If the message is successfully sent, the server will pass it back to
+ the client without inspecting it as `local_message_id` in the
+ [`message` event](/api/get-events#message) that the client with the
+ above `queue_id` will receive.
example: "100.01"
read_by_sender:
type: boolean