this post was submitted on 21 Jun 2023
2 points (100.0% liked)

Lemmy

496 readers
2 users here now

Everything about Lemmy; bugs, gripes, praises, and advocacy.

For discussion about the lemmy.ml instance, go to !meta@lemmy.ml.

founded 4 years ago
MODERATORS
 

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/lemmy@lemmy.ml/1418036 for this current post

you are viewing a single comment's thread
view the rest of the comments
[–] Edo78@feddit.it 1 points 1 year ago (1 children)

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)

[–] yote_zip@pawb.social 1 points 1 year ago (1 children)

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 and post 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

[–] Edo78@feddit.it 0 points 1 year ago (1 children)

first things first can i use my timezone as an excuse for forgetting the uuids?

The whole link from an instance you are not logged in is a PITA. I don't get if I miss some magic URL but right now sharing something requires a search in your instance (as we described) and it's not a user friendly UX Maybe there is some API that search/import something from other instances.

Unless I miss something @username@instance isn't really linked from anywhere but your instance create a local link when you search for it (or when is somehow imported)

[–] yote_zip@pawb.social 1 points 1 year ago

yeah that about sums it up. I don't know if the technology already exists, or if it would be super annoying to do, but I feel like it should theoretically be possible at some point.

I agree the UX is not excellent. I've wanted to link a comment/post to someone a few times but I didn't want to hijack them into pawb.social and give them whiplash, so I always search for the comment in the original instance first before I link it. It takes a long time compared to just typing a short link that the webui/apps can translate into a magic local link that will auto-fetch when clicked.