Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
topic_link_util: Use `hash_util` functions to get channel link.
Aman Agrawal6aca4c85094d
diff --git a/web/src/topic_link_util.ts b/web/src/topic_link_util.tsindex 2b202dafdae..c52d37796a8 100644--- a/web/src/topic_link_util.ts+++ b/web/src/topic_link_util.ts@@ -1,7 +1,6 @@import assert from "minimalistic-assert";-import * as internal_url from "../shared/src/internal_url.ts";-+import * as hash_util from "./hash_util.ts";import * as stream_data from "./stream_data.ts";const invalid_stream_topic_regex = /[`>*&[\]]|(\$\$)/g;@@ -62,11 +61,7 @@ export function get_topic_link_content(assert(stream_id !== undefined);const escape = html_escape_markdown_syntax_characters;if (topic_name !== undefined) {- const stream_topic_url = internal_url.by_stream_topic_url(- stream_id,- topic_name,- () => stream_name,- );+ const stream_topic_url = hash_util.by_stream_topic_url(stream_id, topic_name);if (message_id !== undefined) {return {text: `#${escape(stream_name)} > ${escape(topic_name)} @ 💬`,@@ -80,7 +75,7 @@ export function get_topic_link_content(}return {text: `#${escape(stream_name)}`,- url: internal_url.by_stream_url(stream_id, () => stream_name),+ url: hash_util.by_stream_url(stream_id),};}