mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 11:22:04 +00:00
api docs: Use enum for reaction_type.
It's not currently rendered in the docs, but good to have this in place anyway: https://github.com/zulip/zulip/pull/21005#discussion_r797823366
This commit is contained in:
@@ -468,7 +468,7 @@ reaction_add_event = event_dict_type(
|
|||||||
("message_id", int),
|
("message_id", int),
|
||||||
("emoji_name", str),
|
("emoji_name", str),
|
||||||
("emoji_code", str),
|
("emoji_code", str),
|
||||||
("reaction_type", str),
|
("reaction_type", EnumType(["unicode_emoji", "realm_emoji", "zulip_extra_emoji"])),
|
||||||
("user_id", int),
|
("user_id", int),
|
||||||
("user", reaction_legacy_user_type),
|
("user", reaction_legacy_user_type),
|
||||||
]
|
]
|
||||||
@@ -483,7 +483,7 @@ reaction_remove_event = event_dict_type(
|
|||||||
("message_id", int),
|
("message_id", int),
|
||||||
("emoji_name", str),
|
("emoji_name", str),
|
||||||
("emoji_code", str),
|
("emoji_code", str),
|
||||||
("reaction_type", str),
|
("reaction_type", EnumType(["unicode_emoji", "realm_emoji", "zulip_extra_emoji"])),
|
||||||
("user_id", int),
|
("user_id", int),
|
||||||
("user", reaction_legacy_user_type),
|
("user", reaction_legacy_user_type),
|
||||||
]
|
]
|
||||||
@@ -1767,7 +1767,7 @@ user_status_event = event_dict_type(
|
|||||||
("status_text", str),
|
("status_text", str),
|
||||||
("emoji_name", str),
|
("emoji_name", str),
|
||||||
("emoji_code", str),
|
("emoji_code", str),
|
||||||
("reaction_type", str),
|
("reaction_type", EnumType(["unicode_emoji", "realm_emoji", "zulip_extra_emoji"])),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
_check_user_status = make_checker(user_status_event)
|
_check_user_status = make_checker(user_status_event)
|
||||||
|
|||||||
@@ -1695,6 +1695,10 @@ paths:
|
|||||||
**Changes**: New in Zulip 5.0 (feature level 86).
|
**Changes**: New in Zulip 5.0 (feature level 86).
|
||||||
reaction_type:
|
reaction_type:
|
||||||
type: string
|
type: string
|
||||||
|
enum:
|
||||||
|
- unicode_emoji
|
||||||
|
- realm_emoji
|
||||||
|
- zulip_extra_emoji
|
||||||
description: |
|
description: |
|
||||||
The [emoji type](/api/update-status#parameter-reaction_type) for
|
The [emoji type](/api/update-status#parameter-reaction_type) for
|
||||||
the emoji the user selected for their new status.
|
the emoji the user selected for their new status.
|
||||||
@@ -12102,6 +12106,10 @@ paths:
|
|||||||
**Changes**: New in Zulip 5.0 (feature level 86).
|
**Changes**: New in Zulip 5.0 (feature level 86).
|
||||||
reaction_type:
|
reaction_type:
|
||||||
type: string
|
type: string
|
||||||
|
enum:
|
||||||
|
- unicode_emoji
|
||||||
|
- realm_emoji
|
||||||
|
- zulip_extra_emoji
|
||||||
description: |
|
description: |
|
||||||
If present, a string indicating the type of emoji. Each emoji
|
If present, a string indicating the type of emoji. Each emoji
|
||||||
`reaction_type` has an independent namespace for values of `emoji_code`.
|
`reaction_type` has an independent namespace for values of `emoji_code`.
|
||||||
@@ -18305,6 +18313,10 @@ components:
|
|||||||
within the namespace of the `reaction_type`.
|
within the namespace of the `reaction_type`.
|
||||||
reaction_type:
|
reaction_type:
|
||||||
type: string
|
type: string
|
||||||
|
enum:
|
||||||
|
- unicode_emoji
|
||||||
|
- realm_emoji
|
||||||
|
- zulip_extra_emoji
|
||||||
description: |
|
description: |
|
||||||
A string indicating the type of emoji. Each emoji `reaction_type`
|
A string indicating the type of emoji. Each emoji `reaction_type`
|
||||||
has an independent namespace for values of `emoji_code`.
|
has an independent namespace for values of `emoji_code`.
|
||||||
|
|||||||
Reference in New Issue
Block a user