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 description of update_message_flags op: add event.

Lauryn Menard6671a4a3f5b1
diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yaml
index d6082586e7b..f4aff49176b 100644
--- a/zerver/openapi/zulip.yaml
+++ b/zerver/openapi/zulip.yaml
@@ -2764,7 +2764,44 @@ paths:
Event sent to a user when [message flags][message-flags] are added
to messages.
+ This can reflect a direct user action, or can be the indirect
+ consequence of another action. Whatever the cause, if there's a change
+ in the set of message flags that the user has for a message, then an
+ `update_message_flags` event will be sent with the change. Note
+ that this applies when the user already had access to the message, and
+ continues to have access to it. When a message newly appears or
+ disappears, a [`message`][message-event] or
+ [`delete_message`][message-delete] event is sent instead.
+
+ Some examples of actions that trigger an `update_message_flags`
+ event:
+
+ - The `"starred"` flag is added when the user chooses to [star a
+ message](/help/star-a-message).
+ - The `"read"` flag is added when the user marks messages as read by
+ scrolling through them, or uses [Mark all messages as read][all-read]
+ on a conversation.
+ - The `"read"` flag is added when the user [mutes](/help/mute-a-user) a
+ message's sender.
+ - The `"read"` flag is added after the user unsubscribes from a stream,
+ or messages are moved to a not-subscribed stream, provided the user
+ can still access the messages at all. Note a
+ [`delete_message`][message-delete] event is sent in the case where the
+ user can no longer access the messages.
+
+ In some cases, a change in message flags that's caused by another change
+ may happen a short while after the original change, rather than
+ simultaneously. For example, when messages that were unread are moved to
+ a stream where the user is not subscribed, the resulting change in
+ message flags (and the corresponding `update_message_flags` event with
+ flag `"read"`) may happen later than the message move itself. The delay
+ in that example is typically at most a few hundred milliseconds and can
+ in rare cases be minutes or longer.
+
[message-flags]: /api/update-message-flags#available-flags
+ [message-event]: /api/get-events#message
+ [message-delete]: /api/get-events#delete_message
+ [all-read]: /help/marking-messages-as-read#mark-all-messages-as-read
properties:
id:
$ref: "#/components/schemas/EventIdSchema"
@@ -2823,6 +2860,10 @@ paths:
Event sent to a user when [message flags][message-flags] are
removed from messages.
+ See the description for the [`update_message_flags` op:
+ `add`](/api/get-events#update_message_flags-add) event for
+ more details about these events.
+
[message-flags]: /api/update-message-flags#available-flags
properties:
id: