Skip to content

Provide permalinks for topics #21505

Closed
@gnprice

Description

@gnprice

As @CohenCyril reported at #15290:

The links (for streams, topics and messages) we obtain by clicking "Copy link"/"Copy link to conversation" in the interface, or automatically generated by "Quote & reply" are relative to the names of the stream/topic (while the id of the message stays correct), and they break when streams are renamed, when topics are moved or renamed and when messages are moved to other streams/topics. In particular, topics are moved or renamed quite frequently, by design, and when they are, all links to messages are suddenly lost, in external and internal communications, which is really problematic, ...

Our stream links were in fact already permalinks, and with #21426 our message links (with /near/) are too, by following the message to wherever it's gone.

But we also have links that are to topics without a message ID. We generate those when you click a topic in the left sidebar; in the URL bar when you're viewing a topic; and in Markdown from syntax like #**general>some topic**, which we generate for you through autocomplete. We should find a solution to make those links keep working after the topic is renamed, too -- particularly given that the resolve-topic feature causes topics to be renamed very frequently.

I think this will probably look something like: we encode into those links a message ID too, so that we can follow that message around using the same logic as in /near/ links. I.e., we'd add another narrow operator that takes a message ID, and has a slightly different meaning from near: it'd mean to find the thread where that message now is (just like for near), and then go to the first unread.

Chat thread: https://chat.zulip.org/#narrow/stream/101-design/topic/redirects.20from.20near.20links/near/1349463.2E01

#11699 has some older technical discussion that may be of limited use.

API and clients

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions