Hello!
Is there a way to deterministically find an arbitrary post/comment on another instance? e.g. if I click on Post A on Instance A and I want to see what Post A looks like on Server B, how would I link there?
I assume there’s some sort of ID in the backend so that all the servers know which posts match to each other, but is that exposed in the frontend somehow?
Mainly thinking of a way to utilize this in order to have a userscript that can send you back to your home instance if you get linked to a foreign instance’s post.
E.g., maybe I could do something like https://myhomeinstance.net/post/[email protected]/1418036 for this current post
This is an interesting question but I’m no expert AT ALL so I urge you to double and triple check my words.
I did a little test on my instance ( feddit.it ) and I notice that I have to search for something IN my instance. This way my instance “import” posts from other instances.
Eg. I listed your posts on your instance and I selected this one https://pawb.social/post/117202 then, on my instance, I searched for the url of your post and I got this page https://feddit.it/search/q/https%3A%2F%2Fpawb.social%2Fpost%2F117202/type/All/sort/TopAll/listing_type/All/community_id/0/creator_id/0/page/1 with your post now federated in my instance https://feddit.it/post/395453 There is no pre shared ID unique on all instances because an instance start to get contents from another instance only when a user try to reach something
Hope this made some sense and it can help you (tag me whenever you’ll be able to create your userscript or if you need some help)
Yep, it makes sense that you need to search it before it will get pulled in, but I think it should technically be possible to search and pull that post on the fly when you enter a URL that you don’t have yet. Maybe the Lemmy internals are really not set up for this but I would think it’s possible to:
- pass another
instance
andpost ID
into your home instance (concatenated, I think this is a unique identifier) - your home instance checks to see if that instance+postID already exists locally
- if it finds it, it serves it
- if it doesn’t find it, home instance grabs it first, then serves it
- home instance serves you the post
It’s probably not as efficient as a wholesale pub/sub method that I assume the fediverse runs on but it would be a feature that could be used.
UUIDs could also be used if there’s a problem involving unique identifiers without coordination
- pass another