Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
minor: Move code for web_public_stream_ids.
Steve Howellc5769d31f2d6
diff --git a/zerver/lib/actions.py b/zerver/lib/actions.pyindex 359fae019ea..1d762a7e369 100644--- a/zerver/lib/actions.py+++ b/zerver/lib/actions.py@@ -4930,7 +4930,6 @@ def gather_subscriptions_helper(user_profile: UserProfile,stream_dicts = [stream for stream in all_streams if stream['id'] in stream_ids]stream_hash = {}- web_public_stream_ids = [stream['id'] for stream in all_streams if stream['is_web_public']]for stream in stream_dicts:stream_hash[stream["id"]] = stream@@ -5025,7 +5024,8 @@ def gather_subscriptions_helper(user_profile: UserProfile,if user_profile.can_access_public_streams():never_subscribed_stream_ids = all_streams_id_set - sub_unsub_stream_idselse:- never_subscribed_stream_ids = set(web_public_stream_ids) - sub_unsub_stream_ids+ web_public_stream_ids = {stream['id'] for stream in all_streams if stream['is_web_public']}+ never_subscribed_stream_ids = web_public_stream_ids - sub_unsub_stream_idsnever_subscribed_streams = [ns_stream_dict for ns_stream_dict in all_streamsif ns_stream_dict['id'] in never_subscribed_stream_ids]