mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
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:
@@ -1070,6 +1070,12 @@ def apply_event(
|
||||
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"] = [
|
||||
stream
|
||||
for stream in state["unsubscribed"]
|
||||
|
||||
Reference in New Issue
Block a user