mirror of https://github.com/zulip/zulip.git
events: Remove name field from update subscription events.
This commit removes name field from update subscription events, as it is not used by any of the clients, and use stream_id in the events code instead.
This commit is contained in:
parent
189e86e18e
commit
9a432b0c3b
|
@ -562,7 +562,6 @@ exports.fixtures = {
|
||||||
subscription__update: {
|
subscription__update: {
|
||||||
type: "subscription",
|
type: "subscription",
|
||||||
op: "update",
|
op: "update",
|
||||||
name: streams.devel.name,
|
|
||||||
stream_id: streams.devel.stream_id,
|
stream_id: streams.devel.stream_id,
|
||||||
property: "pin_to_top",
|
property: "pin_to_top",
|
||||||
value: true,
|
value: true,
|
||||||
|
|
|
@ -10,6 +10,11 @@ below features are supported.
|
||||||
|
|
||||||
## Changes in Zulip 4.0
|
## Changes in Zulip 4.0
|
||||||
|
|
||||||
|
**Feature level 41**
|
||||||
|
|
||||||
|
* [`GET /events`](/api/get-events): Remove name field from update
|
||||||
|
subscription events.
|
||||||
|
|
||||||
**Feature level 40**
|
**Feature level 40**
|
||||||
|
|
||||||
* [`GET /events`](/api/get-events): Remove email field from update
|
* [`GET /events`](/api/get-events): Remove email field from update
|
||||||
|
|
|
@ -30,7 +30,7 @@ DESKTOP_WARNING_VERSION = "5.2.0"
|
||||||
#
|
#
|
||||||
# Changes should be accompanied by documentation explaining what the
|
# Changes should be accompanied by documentation explaining what the
|
||||||
# new level means in templates/zerver/api/changelog.md.
|
# new level means in templates/zerver/api/changelog.md.
|
||||||
API_FEATURE_LEVEL = 40
|
API_FEATURE_LEVEL = 41
|
||||||
|
|
||||||
# Bump the minor PROVISION_VERSION to indicate that folks should provision
|
# 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
|
# only when going from an old version of the code to a newer version. Bump
|
||||||
|
|
|
@ -3700,7 +3700,6 @@ def do_change_subscription_property(
|
||||||
property=event_property_name,
|
property=event_property_name,
|
||||||
value=event_value,
|
value=event_value,
|
||||||
stream_id=stream.id,
|
stream_id=stream.id,
|
||||||
name=stream.name,
|
|
||||||
)
|
)
|
||||||
send_event(user_profile.realm, event, [user_profile.id])
|
send_event(user_profile.realm, event, [user_profile.id])
|
||||||
|
|
||||||
|
|
|
@ -1225,7 +1225,6 @@ subscription_update_event = event_dict_type(
|
||||||
("property", str),
|
("property", str),
|
||||||
("stream_id", int),
|
("stream_id", int),
|
||||||
("value", value_type),
|
("value", value_type),
|
||||||
("name", str),
|
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
_check_subscription_update = make_checker(subscription_update_event)
|
_check_subscription_update = make_checker(subscription_update_event)
|
||||||
|
|
|
@ -783,7 +783,7 @@ def apply_event(
|
||||||
|
|
||||||
elif event["op"] == "update":
|
elif event["op"] == "update":
|
||||||
for sub in state["subscriptions"]:
|
for sub in state["subscriptions"]:
|
||||||
if sub["name"].lower() == event["name"].lower():
|
if sub["stream_id"] == event["stream_id"]:
|
||||||
sub[event["property"]] = event["value"]
|
sub[event["property"]] = event["value"]
|
||||||
elif event["op"] == "peer_add":
|
elif event["op"] == "peer_add":
|
||||||
if include_subscribers:
|
if include_subscribers:
|
||||||
|
|
|
@ -580,10 +580,6 @@ paths:
|
||||||
type: integer
|
type: integer
|
||||||
description: |
|
description: |
|
||||||
The ID of the stream whose subscription details have changed.
|
The ID of the stream whose subscription details have changed.
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
description: |
|
|
||||||
The name of the stream whose subscription details have changed.
|
|
||||||
property:
|
property:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
|
@ -609,7 +605,6 @@ paths:
|
||||||
"property": "pin_to_top",
|
"property": "pin_to_top",
|
||||||
"value": true,
|
"value": true,
|
||||||
"stream_id": 11,
|
"stream_id": 11,
|
||||||
"name": "test_stream",
|
|
||||||
"id": 0,
|
"id": 0,
|
||||||
}
|
}
|
||||||
- type: object
|
- type: object
|
||||||
|
|
Loading…
Reference in New Issue