this post was submitted on 10 Jun 2024
230 points (100.0% liked)

Fediverse

27910 readers
1 users here now

A community to talk about the Fediverse and all it's related services using ActivityPub (Mastodon, Lemmy, KBin, etc).

If you wanted to get help with moderating your own community then head over to [email protected]!

Rules

Learn more at these websites: Join The Fediverse Wiki, Fediverse.info, Wikipedia Page, The Federation Info (Stats), FediDB (Stats), Sub Rehab (Reddit Migration), Search Lemmy

founded 2 years ago
MODERATORS
 

For instance, this one (link to a post to [email protected]): https://reddthat.com/post/20260613

Pasting it in your search bar should give you this kind of results:

You can then click on it to access the post from your instance (in this example, lemmy.zip: https://lemmy.zip/post/16918691)

you are viewing a single comment's thread
view the rest of the comments
[โ€“] mark 11 points 5 months ago (2 children)

Was about to ask if there was a way to do this automatically. Does anyone know why this isn't baked into the Lemmy codebase? I'm thinking this would be pretty easy with browser cookies. ๐Ÿค”

[โ€“] [email protected] 10 points 5 months ago (4 children)

It would have to go through some sort of Lemmy link redirector service because a site can't access another site's cookies. And even then, with third-party cookie sandboxing, that still wouldn't work.

I don't think this is solvable without a browser extension. The best the devs could do is let you enter your home instance URL on each instance such that eventually you've configured them all and it works. But the extensions are just plain better.

[โ€“] [email protected] 3 points 5 months ago (1 children)

Why would you need another site's browser cookies?

[โ€“] [email protected] 1 points 5 months ago (3 children)

Because if you're on say, lemmy.world because you clicked such a link, lemmy.world has no way of knowing what your home instance is. The cookies are all sandboxed for lemmy.world's use. So even if you used a third-party site whose sole purpose is to know your home instance, it still wouldn't work because now third-party cookies are sandboxes based on the domain of the site you're visiting.

That used to be possible with a third-party. That's how the Facebook like buttons and Login with Google used to work, and those are also the reason it's no longer possible. You used to be able to just embed some JS from a third-party on a site, and that JS can access cookies from the third-party site while also being directly callable from the site that embedded it. So in that case, we could agree on a third-party lemmy redirector service whose sole purpose is to store the user's home instance in a cookie and then the script can be embedded everywhere and it would be able to spit out the URL from the cookie. But that hole's been plugged. So even if you do that, it doesn't work anymore because of stronger cookie sandboxes. But that's why you'd need third-party cookies to pull it off.

So the only fix left for this is, every lemmy instance you visit, you have to set your home instance on it, which would set a cookie that the site can actually see, then it could redirect you to your home instance to view the post. But that still kinda sucks, because you have to do it for every instance you run across.

So, cookies are useless for this.

[โ€“] [email protected] 5 points 5 months ago (2 children)

You're missing the point. You should never leave your home instance. Lemmy could automatically remap links to whatever your home instance is before you ever click on them.

[โ€“] [email protected] 5 points 5 months ago* (last edited 5 months ago) (2 children)

Some UIs do, I have Tesseract on mine and it rewrites the links for me.

That doesn't solve sharing a link on Matrix/Discord/Google or wherever. I rarely have this issue on Lemmy itself, but whenever I get a link from elsewhere, that's when I need to be able to open it on my home instance so I can interact with it.

Same deal with Mastodon. You're reading some news, it links so the dev's Mastodon, you need a way to open it in your home instance.

There's no fixing that.

EDIT: test self link to this comment https://lemmy.world/comment/10561034

[โ€“] [email protected] 5 points 5 months ago

This is what that looks like on a good Lemmy frontend:

I forgot the default UI didn't do that. Both Tesseract and Boost handle those mostly just fine.

[โ€“] [email protected] 2 points 5 months ago

Yeah, 3rd party links are a tougher nut to crack. You'd think they could at least fix the local links, though.

I can think of a few potential solutions, but they'd all require a lot of user opt in and centralisation, which makes it unlikely to ever happen.

[โ€“] [email protected] 2 points 5 months ago

I generally agree with you.

However, I want to encourge you to consider softening up your replies to people who you don't have a strong prior social connection with. I've started making an effort to do that and I've found that I'm having more rewarding conversations now.

[โ€“] [email protected] 2 points 5 months ago (1 children)

That's very different from what I think people generally want by default, which is that when you're on lemmy.world, it's because that's your home instance and any links to other instances would be automatically converted to the lenmy.world version of the post or comment by default (as long as the two instances are federated).

Anyone that wants more could find a browser plugin or script, but every new user with an account of any instance would have an initial experience that's much less confusing and more consistent and pleasant.

[โ€“] [email protected] 1 points 5 months ago (1 children)

I haven't encountered that particular one in a while. Usually it's Lemmy links from elsewhere like Matrix or Discord or whatever that are annoying to deal with and needs redirecting.

Most apps seems to rewrite the links already just fine, at least Tesseract does. It's not like the default UI is known to be good. It's functional but the UX is terrible.

[โ€“] [email protected] 1 points 5 months ago

The default UI is how most new users will experience interacting with lemmy instances at first. So it's helpful to create a better first impression. To the extent that this is built into the project itself makes it easier for other UIs to be created and maintained too.

I believe that the Lemmy devs are working on a better url scheme for posts and comments as well. This will also make it less annoying without any browser extension, script, or other third part service.

[โ€“] mark 1 points 5 months ago

Sites can still have third-party cookies. The first party domain just needs to explicitly allow them.

[โ€“] [email protected] 2 points 5 months ago* (last edited 5 months ago)

I think it is solvable. Your instance keeps track of the instances it is connected with. It could just do the search and find the post on your own instance if the domain is among the connected other instances.

EDIT: Right, it doesn't fix the problem of stumbling upon a link to a fediverse instance somewhere else. Not sure how you could deal with that one

[โ€“] [email protected] 1 points 5 months ago

That's how mastodon works now and i think it's worthwhile as a basic feature.

[โ€“] mark 1 points 5 months ago* (last edited 5 months ago)

A website can access another site's cookies if the first party domain explicitly allows them, which would need to happen in this case. Sure, admins would have to allow which sites can access the cookie. But at least that burden is placed on admins vs the users.

Browser extensions arent secure and many mobile browsers dont support them, so that wouldnt be a proper solution. A lot of users use Lemmy on their mobile phones.

[โ€“] [email protected] 9 points 5 months ago

It's not implimented because the developers of lemmy have been prioritizing other issues and features. They say they're open to code contributions, so someone would have to volunteer to do it.