mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
events: Update subscriber list on peer_remove for unsubscribed stream.
We update the subscriber list on peer_remove event for unsubscribed streams also.
This commit is contained in:
@@ -727,7 +727,7 @@ def apply_event(state: Dict[str, Any],
|
||||
elif event['op'] == 'peer_remove':
|
||||
stream_ids = set(event["stream_ids"])
|
||||
user_ids = set(event["user_ids"])
|
||||
for sub_dict in [state["subscriptions"]]:
|
||||
for sub_dict in [state["subscriptions"], state['unsubscribed']]:
|
||||
for sub in sub_dict:
|
||||
if sub["stream_id"] in stream_ids:
|
||||
subscribers = set(sub["subscribers"]) - user_ids
|
||||
|
||||
Reference in New Issue
Block a user