Commit Graph

4 Commits

Author SHA1 Message Date
Evy Kassirer
10a815cae7 stream_data: Rename add_sub to add_sub_for_tests. 2025-09-30 12:52:47 -07:00
Tim Abbott
68c3e86ffa stream_data: Fix parsing of slugs for inaccessible channels.
Previously, if we had syntax in a URL slug that looked like a channel
ID, but we couldn't find the channel (say, beacuse it's a link to a
channel we're not subscribed to), parse_narrow would fail to parse it,
resulting in incorrect error handling.

This could break rendering of topic links that we want to process via
rendered_markdown.ts. I've confirmed that the web app's logic for
processing message_view.show does not require its caller to check the
channel ID is accessible.

The updated logic matches what we do in the mobile apps.
2025-02-05 14:01:11 -08:00
Prakhar Pratyush
53ba17e1e0 narrow: Handle narrow links with empty topic names.
This commit ensures that narrow links involving
empty topic names, such as:

* #narrow/channel/1-general/topic//near/12345
* #narrow/channel/1-general/topic/

work correctly in the web client.

This change ensures proper navigation and behavior
for such links.
2025-01-10 14:32:55 -08:00
Anders Kaseorg
687f1b1651 tests: Rename the Node tests to *.cjs.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00