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.
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.