Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
filter: Add channels/streams to valid search operators.
evykassirer7a160d45bdc9
diff --git a/web/src/filter.ts b/web/src/filter.tsindex a303efb632f..aa95d54f213 100644--- a/web/src/filter.ts+++ b/web/src/filter.ts@@ -530,6 +530,9 @@ export class Filter {case "channel":case "stream":return stream_data.get_sub(term.operand) !== undefined;+ case "channels":+ case "streams":+ return term.operand === "public";case "topic":return true;case "sender":diff --git a/web/tests/filter.test.js b/web/tests/filter.test.jsindex 4e8dbbcda25..995d463c094 100644--- a/web/tests/filter.test.js+++ b/web/tests/filter.test.js@@ -1675,6 +1675,8 @@ test("is_valid_search_term", () => {["near: home", false],["channel: Denmark", true],["channel: GhostTown", false],+ ["channels: public", true],+ ["channels: private", false],["topic: GhostTown", true],["dm-including: [email protected]", true],["sender: [email protected]", false],