Skip to content

Handle "general chat" in rendering #-mentions #1299

Open
@gnprice

Description

@gnprice

When the user types a #-mention of a stream/channel, a topic, or 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

Currently we just ignore that class and treat the element the same as any other link. But coming soon, Zulip web will rewrite the topic name in one case: when a #-mention of a topic or message points to a topic that is the empty string, i.e. the special "general chat" topic, the client will rewrite the topic name with the display name it uses for that topic elsewhere in the UI per #1250. (It already rewrites the channel name to handle renames: #1047.)

So we should match that behavior.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    a-contentParsing and rendering Zulip HTML content, notably message contentsserver-10Things new in Zulip Server 10.0

    Type

    No type

    Projects

    • Status

      No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions