mirror of https://github.com/zulip/zulip.git
typing_indicator: Replace private with direct in 'message_type' field.
This commit replaces the value `private` with `direct` in the `message_type` field for the `typing` events sent when a user starts or stops typing a message.
This commit is contained in:
parent
5817da709c
commit
a22f637769
|
@ -20,6 +20,12 @@ format used by the Zulip server that they are interacting with.
|
|||
|
||||
## Changes in Zulip 8.0
|
||||
|
||||
**Feature level 215**
|
||||
|
||||
* [`GET /events`](/api/get-events): Replaced the value `private`
|
||||
with `direct` in the `message_type` field for the `typing` events
|
||||
sent when a user starts or stops typing a message.
|
||||
|
||||
**Feature level 214**
|
||||
|
||||
* [`PATCH /realm/user_settings_defaults`](/api/update-realm-user-settings-defaults),
|
||||
|
|
|
@ -33,7 +33,7 @@ DESKTOP_WARNING_VERSION = "5.9.3"
|
|||
# Changes should be accompanied by documentation explaining what the
|
||||
# new level means in api_docs/changelog.md, as well as "**Changes**"
|
||||
# entries in the endpoint's documentation in `zulip.yaml`.
|
||||
API_FEATURE_LEVEL = 214
|
||||
API_FEATURE_LEVEL = 215
|
||||
|
||||
# Bump the minor PROVISION_VERSION to indicate that folks should provision
|
||||
# only when going from an old version of the code to a newer version. Bump
|
||||
|
|
|
@ -756,7 +756,7 @@ exports.fixtures = {
|
|||
typing__start: {
|
||||
type: "typing",
|
||||
op: "start",
|
||||
message_type: "private",
|
||||
message_type: "direct",
|
||||
sender: typing_person1,
|
||||
recipients: [typing_person2],
|
||||
},
|
||||
|
@ -764,7 +764,7 @@ exports.fixtures = {
|
|||
typing__stop: {
|
||||
type: "typing",
|
||||
op: "stop",
|
||||
message_type: "private",
|
||||
message_type: "direct",
|
||||
sender: typing_person1,
|
||||
recipients: [typing_person2],
|
||||
},
|
||||
|
|
|
@ -19,7 +19,7 @@ def do_send_typing_notification(
|
|||
]
|
||||
event = dict(
|
||||
type="typing",
|
||||
message_type="private",
|
||||
message_type="direct",
|
||||
op=operator,
|
||||
sender=sender_dict,
|
||||
recipients=recipient_dicts,
|
||||
|
|
|
@ -1443,9 +1443,9 @@ typing_person_type = DictType(
|
|||
]
|
||||
)
|
||||
|
||||
equals_private_or_stream = EnumType(
|
||||
equals_direct_or_stream = EnumType(
|
||||
[
|
||||
"private",
|
||||
"direct",
|
||||
"stream",
|
||||
]
|
||||
)
|
||||
|
@ -1454,7 +1454,7 @@ typing_start_event = event_dict_type(
|
|||
required_keys=[
|
||||
("type", Equals("typing")),
|
||||
("op", Equals("start")),
|
||||
("message_type", equals_private_or_stream),
|
||||
("message_type", equals_direct_or_stream),
|
||||
("sender", typing_person_type),
|
||||
],
|
||||
optional_keys=[
|
||||
|
@ -1469,7 +1469,7 @@ typing_stop_event = event_dict_type(
|
|||
required_keys=[
|
||||
("type", Equals("typing")),
|
||||
("op", Equals("stop")),
|
||||
("message_type", equals_private_or_stream),
|
||||
("message_type", equals_direct_or_stream),
|
||||
("sender", typing_person_type),
|
||||
],
|
||||
optional_keys=[
|
||||
|
|
|
@ -2523,12 +2523,15 @@ paths:
|
|||
message_type:
|
||||
type: string
|
||||
description: |
|
||||
Type of message being composed. Must be `"stream"` or `"private"`.
|
||||
Type of message being composed. Must be `"stream"` or `"direct"`.
|
||||
|
||||
**Changes**: New in Zulip 4.0 (feature level 58). Previously,
|
||||
all typing notifications were implicitly direct messages.
|
||||
**Changes**: In Zulip 8.0 (feature level 215), replaced the
|
||||
value `"private"` with `"direct"`.
|
||||
|
||||
New in Zulip 4.0 (feature level 58). Previously, all typing
|
||||
notifications were implicitly direct messages.
|
||||
enum:
|
||||
- private
|
||||
- direct
|
||||
- stream
|
||||
sender:
|
||||
additionalProperties: false
|
||||
|
@ -2547,7 +2550,7 @@ paths:
|
|||
recipients:
|
||||
type: array
|
||||
description: |
|
||||
Only present if `message_type` is `"private"`.
|
||||
Only present if `message_type` is `"direct"`.
|
||||
|
||||
Array of dictionaries describing the set of users who would be
|
||||
recipients of the message being typed. Each dictionary contains
|
||||
|
@ -2589,7 +2592,7 @@ paths:
|
|||
{
|
||||
"type": "typing",
|
||||
"op": "start",
|
||||
"message_type": "private",
|
||||
"message_type": "direct",
|
||||
"sender":
|
||||
{
|
||||
"user_id": 10,
|
||||
|
@ -2641,12 +2644,15 @@ paths:
|
|||
message_type:
|
||||
type: string
|
||||
description: |
|
||||
Type of message being composed. Must be `"stream"` or `"private"`.
|
||||
Type of message being composed. Must be `"stream"` or `"direct"`.
|
||||
|
||||
**Changes**: New in Zulip 4.0 (feature level 58). Previously,
|
||||
all typing notifications were implicitly direct messages.
|
||||
**Changes**: In Zulip 8.0 (feature level 215), replaced the
|
||||
value `"private"` with `"direct"`.
|
||||
|
||||
New in Zulip 4.0 (feature level 58). Previously all typing
|
||||
notifications were implicitly direct messages.
|
||||
enum:
|
||||
- private
|
||||
- direct
|
||||
- stream
|
||||
sender:
|
||||
additionalProperties: false
|
||||
|
@ -2665,7 +2671,7 @@ paths:
|
|||
recipients:
|
||||
type: array
|
||||
description: |
|
||||
Only present if `message_type` is `"private"`.
|
||||
Only present if `message_type` is `"direct"`.
|
||||
|
||||
Array of dictionaries describing the set of users who would be
|
||||
recipients of the message that was previously being typed. Each
|
||||
|
@ -2707,7 +2713,7 @@ paths:
|
|||
{
|
||||
"type": "typing",
|
||||
"op": "stop",
|
||||
"message_type": "private",
|
||||
"message_type": "direct",
|
||||
"sender":
|
||||
{
|
||||
"user_id": 10,
|
||||
|
|
|
@ -32,7 +32,6 @@ def send_notification_backend(
|
|||
|
||||
recipient_type_name = req_type
|
||||
if recipient_type_name == "private":
|
||||
# TODO: Use "direct" in typing notification events.
|
||||
recipient_type_name = "direct"
|
||||
|
||||
if recipient_type_name == "stream":
|
||||
|
|
Loading…
Reference in New Issue