Skip to content

Handle channel renames in rendering #-mentions #1047

Open
@gnprice

Description

@gnprice

When the user types a #-mention of a stream/channel, a topic, or (new just this week) a message, the a element in the resulting HTML has a class to mark it as such. See docs here:
https://zulip.com/api/message-formatting
(or for the moment see them here: zulip/zulip@77064a1 since that docs commit was just merged and isn't yet deployed).

Currently we just ignore that class and treat the element the same as any other link. (That's true as I write this for channel and topic mentions, and after #1046 it'll be true for message mentions too.)

But Zulip web has a fancier feature where it looks up the current name of the linked-to channel, and renders with that:
https://chat.zulip.org/#narrow/channel/378-api-design/topic/notation.20for.20near.20links/near/1973100
That way, if the channel gets renamed, all the old links show its new name instead of its old name.

So we should match that behavior.

This is a low-priority issue because it's a polish feature for a fairly uncommon situation, and because the legacy zulip-mobile app doesn't have this feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a-contentParsing and rendering Zulip HTML content, notably message contents

    Type

    No type

    Projects

    • Status

      No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions