Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
streams: Do not show archived streams in dropdown.
Sahil Batra7a6159eee2da
diff --git a/web/src/stream_data.ts b/web/src/stream_data.tsindex 0f1f0026458..a21b350ce42 100644--- a/web/src/stream_data.ts+++ b/web/src/stream_data.ts@@ -864,6 +864,7 @@ export function get_options_for_dropdown_widget(): {stream: StreamSubscription;}[] {return subscribed_subs()+ .filter((stream) => !stream.is_archived).map((stream) => ({name: stream.name,unique_id: stream.stream_id,diff --git a/web/tests/stream_data.test.cjs b/web/tests/stream_data.test.cjsindex 9c2a6728a52..e41be0265ab 100644--- a/web/tests/stream_data.test.cjs+++ b/web/tests/stream_data.test.cjs@@ -273,6 +273,24 @@ test("basics", () => {unique_id: 3,},]);++ test.is_archived = true;+ assert.deepEqual(stream_data.get_options_for_dropdown_widget(), [+ {+ name: "social",+ stream: {+ color: "red",+ history_public_to_subscribers: false,+ invite_only: true,+ is_muted: false,+ name: "social",+ stream_id: 2,+ stream_post_policy: 2,+ subscribed: true,+ },+ unique_id: 2,+ },+ ]);});test("get_streams_for_user", ({override}) => {