Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
api-docs: Update the add and remove update_message_flags events.
Lauryn Menard48a1cf04d07d
diff --git a/zerver/lib/event_schema.py b/zerver/lib/event_schema.pyindex 2be2ab1bba9..bb5bb1756e5 100644--- a/zerver/lib/event_schema.py+++ b/zerver/lib/event_schema.py@@ -1630,7 +1630,7 @@ update_message_flags_remove_event = event_dict_type(("type", Equals("update_message_flags")),("op", Equals("remove")),("operation", Equals("remove")),- ("flag", EnumType(["read", "starred"])),+ ("flag", str),("messages", ListType(int)),("all", bool),],diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yamlindex 21cd04bd747..30e3f684791 100644--- a/zerver/openapi/zulip.yaml+++ b/zerver/openapi/zulip.yaml@@ -2726,7 +2726,7 @@ paths:additionalProperties: falsedescription: |Event sent to a user when [message flags][message-flags] are added- to a message.+ to messages.[message-flags]: /api/update-message-flags#available-flagsproperties:@@ -2744,17 +2744,17 @@ paths:operation:deprecated: truedescription: |- Old name for `op` for this event type.+ Old name for the `op` field in this event type.- **Deprecated**: This is deprecated; please use `op` instead- starting with Zulip 4.0 (feature level 32).+ **Deprecated** in Zulip 4.0 (feature level 32), and+ replaced by the `op` field.type: stringenum:- addflag:type: stringdescription: |- The flag that was added.+ The [flag][message-flags] that was added.messages:type: arraydescription: |@@ -2765,9 +2765,12 @@ paths:all:type: booleandescription: |- Whether the flag was added to all messages (E.g. all messages- were marked as read).- If this is true, then the `messages` array will be empty.+ Whether the specified flag was added to all messages.+ This field is only relevant for the `"read"` flag, and+ will be `false` for all other flags.++ When `true` for the `"read"` flag, then the `messages`+ array will be empty.example:{"type": "update_message_flags",@@ -2782,19 +2785,9 @@ paths:additionalProperties: falsedescription: |Event sent to a user when [message flags][message-flags] are- removed from a message.+ removed from messages.[message-flags]: /api/update-message-flags#available-flags- required:- [- "id",- "type",- "op",- "operation",- "flag",- "messages",- "all",- ]properties:id:$ref: "#/components/schemas/EventIdSchema"@@ -2811,19 +2804,16 @@ paths:deprecated: truetype: stringdescription: |- Old name for `op` for this event type.+ Old name for the `op` field in this event type.- **Deprecated**: This is deprecated; please use `op` instead- starting with Zulip 4.0 (feature level 32).+ **Deprecated** in Zulip 4.0 (feature level 32), and+ replaced by the `op` field.enum:- removeflag:type: stringdescription: |- The flag to be removed.- enum:- - starred- - read+ The [flag][message-flags] to be removed.messages:type: arraydescription: |@@ -2832,18 +2822,19 @@ paths:items:type: integerall:+ deprecated: truetype: booleandescription: |- Whether the flag was removed from all messages.- If this is true then the `messages` array will be empty.+ Will be `false` for all specified flags.++ **Deprecated** and will be removed in a future release.message_details:description: |- Present if `message` and `update_message_flags` are both present in- `event_types` and the `flag` is `read` and the `op` is `remove`.+ Only present if the specified `flag` is `"read"`.A set of data structures describing the messages thatare being marked as unread with additional details to- allow a client to update the `unread_msgs` data+ allow clients to update the `unread_msgs` datastructure for these messages (which may not beotherwise known to the client).@@ -2898,8 +2889,7 @@ paths:type: booleandeprecated: truedescription: |- **Deprecated**- Internal implementation detail. Clients should+ **Deprecated** internal implementation detail. Clients shouldignore this field as it will be removed in the future.example:{