Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

page params: Add narrow attribute.

evykassirerb7a28f16304e
diff --git a/web/src/filter.ts b/web/src/filter.ts
index cdfb4936906..e6ed35bba63 100644
--- a/web/src/filter.ts
+++ b/web/src/filter.ts
@@ -233,7 +233,7 @@ function message_matches_search_term(message: Message, operator: string, operand
return true; // unknown operators return true (effectively ignored)
}
-type Term = {
+export type Term = {
negated?: boolean;
operator: string;
operand: string;
diff --git a/web/src/page_params.ts b/web/src/page_params.ts
index e57cb6faa47..068ff2c43f1 100644
--- a/web/src/page_params.ts
+++ b/web/src/page_params.ts
@@ -1,5 +1,6 @@
import $ from "jquery";
+import type {Term} from "./filter";
import type {GroupPermissionSetting} from "./types";
const t1 = performance.now();
@@ -42,6 +43,7 @@ export const page_params: {
max_logo_file_size_mib: number;
muted_users: {id: number; timestamp: number}[];
narrow_stream?: string;
+ narrow: Term[];
needs_tutorial: boolean;
page_load_time: number;
promote_sponsoring_zulip: boolean;