aeharding / voyager

Voyager — a mobile-first Lemmy client
https://vger.app
GNU Affero General Public License v3.0
1.47k stars 166 forks source link

Share Lemmy links with Voyager links #378

Open kerosyn opened 1 year ago

kerosyn commented 1 year ago

To spread Voyager as much as possible links should have the option be shared via Voyager links.

Now that a few servers are hosting their own copies of Voyager (like Lemmy.world), they could even share the locally hosted version of Voyager to spread load more.

Example:

Regular link: https://lemmy.world/post/1234334

Hosted Voyager link: https://m.lemmy.world/posts/lemmy.world/c/memes@lemmy.ml/comments/1234334

Voyager hosted: https://vger.app/posts/lemmy.world/c/memes@lemmy.ml/comments/1234334

rsammelson commented 1 year ago

@aeharding if you want this I could add it with #202, either as a setting or a third option.

aeharding commented 1 year ago

This has some work that needs to be done beforehand, such as dealing with links to instances that aren't the one that you're logged in with.

If you're logged in with lemmy.world, and try to view a post with a Voyager link to lemmy.ml, it won't let you (by design) so what should happen? Should it appear as if you're logged out when you're browsing that instance? How is that messaged so it doesn't appear as if things are broken? What if you try to upvote?

We could leave you logged in and attempt to redirect... but post IDs are different between instances, so we'd have to resolve the post ID for your local instance. What if your local instance doesn't have that post?

:( Lot of work before this can be done.

mdecourcy commented 1 year ago

@aeharding could be a good starting point

https://github.com/ManeraKai/fediredirect/blob/main/src/pages/lib/lemmy.js