Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
composebox: Typing "general chat" should suggest empty string topic.
Prakhar Pratyush4ab2c56b7b08
diff --git a/web/src/composebox_typeahead.ts b/web/src/composebox_typeahead.tsindex 406eea024e8..2e508213642 100644--- a/web/src/composebox_typeahead.ts+++ b/web/src/composebox_typeahead.ts@@ -1464,15 +1464,21 @@ export function initialize({is_empty_string_topic,});},+ matcher(item: string, query: string): boolean {+ const matcher = get_topic_matcher(query);+ return matcher(item);+ },sorter(items: string[], query: string): string[] {- const sorted = typeahead_helper.sorter(query, items, (x) => x);+ const sorted = typeahead_helper.sorter(query, items, (x) =>+ util.get_final_topic_display_name(x),+ );if (sorted.length > 0 && !sorted.includes(query)) {sorted.unshift(query);}return sorted;},option_label(matching_items: string[], item: string): string | false {- if (item !== "" && !matching_items.includes(item)) {+ if (!matching_items.includes(item)) {return `<em>${$t({defaultMessage: "New"})}</em>`;}return false;