Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
narrow_operators: Add `with` operator to `filter.is_conversation_view`.
roanster00761f6ec08291c
diff --git a/web/src/filter.ts b/web/src/filter.tsindex 7945d59e80b..534721c9a43 100644--- a/web/src/filter.ts+++ b/web/src/filter.ts@@ -1571,7 +1571,11 @@ export class Filter {is_conversation_view(): boolean {const term_type = this.sorted_term_types();- if (_.isEqual(term_type, ["channel", "topic"]) || _.isEqual(term_type, ["dm"])) {+ if (+ _.isEqual(term_type, ["channel", "topic", "with"]) ||+ _.isEqual(term_type, ["channel", "topic"]) ||+ _.isEqual(term_type, ["dm"])+ ) {return true;}return false;diff --git a/web/tests/filter.test.js b/web/tests/filter.test.jsindex b8479b837d2..1cf85fb3357 100644--- a/web/tests/filter.test.js+++ b/web/tests/filter.test.js@@ -412,7 +412,7 @@ test("basics", () => {assert.ok(filter.includes_full_stream_history());assert.ok(filter.can_apply_locally());assert.ok(!filter.is_personal_filter());- assert.ok(!filter.is_conversation_view());+ assert.ok(filter.is_conversation_view());assert.ok(filter.can_bucket_by("channel", "topic", "with"));assert.ok(!filter.is_conversation_view_with_near());