urls: Generate narrow links in frontend with "channel" operator.

Fixes #30385.
This commit is contained in:
Lauryn Menard
2024-10-03 18:37:58 +02:00
committed by Tim Abbott
parent 70ab893d34
commit d3987f611c
17 changed files with 94 additions and 109 deletions

View File

@@ -54,7 +54,7 @@ export function by_stream_url(
stream_id: number,
maybe_get_stream_name: MaybeGetStreamName,
): string {
return `#narrow/stream/${encode_stream_id(stream_id, maybe_get_stream_name)}`;
return `#narrow/channel/${encode_stream_id(stream_id, maybe_get_stream_name)}`;
}
export function by_stream_topic_url(
@@ -62,7 +62,7 @@ export function by_stream_topic_url(
topic: string,
maybe_get_stream_name: MaybeGetStreamName,
): string {
return `#narrow/stream/${encode_stream_id(
return `#narrow/channel/${encode_stream_id(
stream_id,
maybe_get_stream_name,
)}/topic/${encodeHashComponent(topic)}`;