-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to relatively link to individual posts #1229
Comments
There is a good discussion about this issue here |
Just noticed that lemmy is perfectly capable of finding the local instances version of a comment when the full URL is posted in the search. As such, I should be fairly easy for a link to a comment on the fediverse be automatically translated to to the local instance by the UI, if it's cached |
We could just have it so that if a URL to a post is posted in the comments, your local instance automatically notices it and interprets it as a link to that post on your own lemmy instance. We'd obviously need to make it so that there's some escaping mechanism, but linking to a post within your own instance seems to be the reasonable default behavior |
I think that's not the same issue. This is about comments. Which, if they don't even share the same ID could be problematic |
That was referencing both posts and communities. Although the most recent discussion seems to just focus on communities. So your right it is probably a good idea to seperate the two. I do think post and comments will be a similar solution as both have unique IDs per instance. Communities should be easier as they are ultimately linking back to a single instance it is just a matter of converting the URL to your instance. |
I'm interested in working on this, but we're going to need to hash out syntax. #1462 codeifies the following formats for communities:
Ideally we'd be able to use a similar syntax, but this gets more complicated because of federated content having a local ID, and there being possible ID collisions between a post and comment. For example there could be post Unfortunately the I'm trying to think of what a useful but recognizable shorthand syntax could be for invoking a remote post versus a remote comment |
Every post/comment needs their own UUID in the URL. When a server displays a link, it checks to see if the UUID exists locally (federated). If so, rewrite the display URL to point to the local federated copy. Otherwise display the original link. Or the local server could do the same rewrite on incoming Federation objects before storing in the DB. |
Is there any news on this topic? |
The best option currently is this violentmonkey script |
For now this will likely remain the best approach as there's no clean and simple way to handle this in without introducing new convoluted syntax that people would have to choose to use for it to be at all effective |
Considering the ViolentMonkey script is just javascript being injected, couldn't it be implemented into the frontend by default? |
Is your proposal related to a problem?
Currently when I want to link to a specific post, I have to always make an absolute link like
https://lemmy.dbzer0.com/post/2212
However anyone following this link from a different instance will be prevented from subscribing or commenting.
If I link to it relatively like so
/post/2212
it doesn't work, because each instance attaches its own ID to every post.Adding the domain to the end like so
/post/[email protected]
also doesn't seem to workDescribe the solution you'd like.
I want a method to allow to link to posts in other instances relatively, to allow discussions to flow natively across the fediverse.
I am thinking of a special format, perhaps like
[email protected]
which the UI would translate to a hyperlink for the current instance if it's federated and exists, or expand to the normal absolute linkhttps://lemmy.dbzer0.com/post/2212
if it's unknown.The same functionality should also be possible in the URL links of new posts.
Describe alternatives you've considered.
None that I could think of
Additional context
Cousin of #1227
I am also not sure if this belongs to UI or to lemmy main repo.
The text was updated successfully, but these errors were encountered: