mirror of https://github.com/zulip/zulip.git
events: Remove deactivated streams from subscriptions field.
We did not remove the objects for deactivated streams from subscriptions field in apply_event. We need to do this because we do not send "subscription/remove" events to subscribers when deactivating streams.
This commit is contained in:
parent
45e1b32447
commit
4f58733d82
|
@ -1070,6 +1070,12 @@ def apply_event(
|
||||||
s for s in state["streams"] if s["stream_id"] not in deleted_stream_ids
|
s for s in state["streams"] if s["stream_id"] not in deleted_stream_ids
|
||||||
]
|
]
|
||||||
|
|
||||||
|
state["subscriptions"] = [
|
||||||
|
stream
|
||||||
|
for stream in state["subscriptions"]
|
||||||
|
if stream["stream_id"] not in deleted_stream_ids
|
||||||
|
]
|
||||||
|
|
||||||
state["unsubscribed"] = [
|
state["unsubscribed"] = [
|
||||||
stream
|
stream
|
||||||
for stream in state["unsubscribed"]
|
for stream in state["unsubscribed"]
|
||||||
|
|
Loading…
Reference in New Issue