this post was submitted on 05 Feb 2024
14 points (100.0% liked)

Lemmy App Development

693 readers
2 users here now

A place for Lemmy builders to chat about building apps, clients, tools and bots for the Lemmy platform.

On-Topic:

Off-Topic:

founded 1 year ago
MODERATORS
 

I recall someone mentioning a way to do it through an ActivityPub “resolve object” endpoint (or something like that) but I couldn’t find anything on it again. #1101 will solve this, but how are you guys handling this in the meantime?

top 4 comments
sorted by: hot top controversial new old
[–] [email protected] 2 points 6 months ago* (last edited 6 months ago) (1 children)

As you said, GET /resolove_object (https://join-lemmy.org/api/interfaces/ResolveObject.html) may work:

$ post_id=9589178
$ curl 'https://lemm.ee/api/v3/resolve_object?q=https%3A%2F%2Fprogramming.dev%2Fpost%2F${post_id}' | jq .post.post.id
22873872
$ curl 'https://lemm.ee/api/v3/post?id=22873872' | jq '.post_view.post | [.id, .name]'
[
  22873872,
  "How do you get the url or id of the same post on a different instance?"
]
[–] [email protected] 2 points 6 months ago (1 children)

Thanks! Exactly what I was looking for, I didn’t look at the docs thoroughly enough it seems

[–] [email protected] 2 points 6 months ago

Glad it worked. I didn't know the endpoint before reading your post.

[–] [email protected] 1 points 6 months ago* (last edited 6 months ago)

Not sure if this is still the case, but a lot of the instances had overcrowding issues. As long as two instances are federated, it makes the most sense to link to the instance that has more available capacity for new users.

That, and a lot of the stuff I follow is on servers that are likely to be de-federated(.ml) or defederate eachother(.ml vs anarchists or primitivists). I prefer to give potential new users the chance to fly under the radar, and only potentially end up banned from a given instance for their own actions. Sharing threads mirrored on more generic instances suits my purposes.

All that said, I'm leaving this thread open, because while I occassionally go to the instance that originated a given thread, scroll to it in their feed, and share the link I find there(there are some niche instances I believe are best for appealing to non-lemmy users who are avid about that niche), that's a PITA non-solution.