mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 19:31:58 +00:00
Use stream_id as key for subscription removals.
Have the server send down the stream's id for removal events, and have the client use that id to look up the stream in its internal data structures. This sets the stage for eventually just sending the stream id (and not the stream name) down to clients, once all our clients are ready to use the stream id. (imported from commit 922516c98fb79ffad8ae7da0396646663ca54fd0)
This commit is contained in:
@@ -1054,7 +1054,7 @@ def notify_subscriptions_removed(user_profile, streams, no_log=False):
|
||||
'names': [stream.name for stream in streams],
|
||||
'domain': stream.realm.domain})
|
||||
|
||||
payload = [dict(name=stream.name) for stream in streams]
|
||||
payload = [dict(name=stream.name, stream_id=stream.id) for stream in streams]
|
||||
event = dict(type="subscription", op="remove",
|
||||
subscriptions=payload)
|
||||
send_event(event, [user_profile.id])
|
||||
|
||||
Reference in New Issue
Block a user