this post was submitted on 07 Jun 2023
66 points (100.0% liked)

Lemmy

2172 readers
1 users here now

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

For discussion about the lemmy.ml instance, go to [email protected].

founded 4 years ago
MODERATORS
 

Hi all!

So, I'm assuming everyone has seen links like https://beehaw.org/c/news and clicked through to find it doesn't work right because it's a different site (I'm assuming a different instance here).

Well, I just stumbled across an interesting feature: if you enter a link in the following format, it works for everyone regardless of instance of origin:

[News](/c/[email protected])

News

[My User](/u/[email protected])

My User

You're welcome!

top 21 comments
sorted by: hot top controversial new old
[โ€“] [email protected] 30 points 1 year ago (1 children)

The only problem is that if your instance doesn't know about that community yet, it'll just 404, you still have to search for it first because visiting the link doesn't make your instance fetch the community yet.

This should still be the default behavior when it autofills a community link though, I hope they make this change ๐Ÿ‘

[โ€“] PriorProject 13 points 1 year ago* (last edited 1 year ago) (1 children)

Seeing the rampant confusion this causes when trying to subscribe to remote communities makes me wonder if the full community list could be shipped on initial federation, and community creation/change events could be eagerly shipped network-wide.

I get that in federated/peer-based systems you need to be choosy about eagerly propagating messages network-wide, but the list of extant communities seems like it would be fairly small even on a big server. Like hundreds would be common, and tens of thousands of communities on a big server could still compress down to a message-size of a few KB. Having the /communities/ search and all-communities page do something useful from the moment of federation seems like it would reduce a lot of confusion.

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

Or fetch it when a link is followed for the first time.

[โ€“] [email protected] 14 points 1 year ago (2 children)

This does not work on Jerboa. In fact most instance/user/community link in Jerboa are just completely broken.

[โ€“] [email protected] 8 points 1 year ago

I'll put up a github issue for it, maybe somebody can look at that

[โ€“] TCGM 1 points 1 year ago

I concur, busted for me too

[โ€“] [email protected] 10 points 1 year ago

The devs have said they'd like to make this happen more automatically, but until then this is a great tip!

[โ€“] [email protected] 7 points 1 year ago (3 children)

Sorry OP, but your links don't work for me. Reading this on kbin and all your links are 404'ing.

https://i.imgur.com/sQD9oxk.png

[โ€“] [email protected] 5 points 1 year ago* (last edited 1 year ago)

Maybe you could bring it up with the Kbin devs? I'm sure it wouldn't be too crazily difficult to have it work similarly over there. Just need to swap /c/ out for a /m/. Probably similar needed over here to translate /m/ to /c/ too.

[โ€“] [email protected] 4 points 1 year ago

This trick only works on Lemmy, because it relies on Lemmy's URL structure. Kbin uses a different URL structure.

[โ€“] [email protected] 1 points 1 year ago

Same, breaking on kbin :(

[โ€“] PriorProject 6 points 1 year ago* (last edited 1 year ago) (2 children)

There are an irksome number of ways to express a community:

The one that gets advertised in the sidebar is [email protected]. I'd love to see a canonical format established that has a superset of the useful behaviors of the non-canonical representations.

Edit: Most of those don't get hotlinked automatically. Does a bang-prefixed link do anything useful (no it doesn't)? And you pointed out c-prefixed does get hotlinked and work.

Edit2: As commenters below note, the behavior varies between web-ui and jerboa. ๐Ÿคฎ

[โ€“] [email protected] 3 points 1 year ago* (last edited 1 year ago) (1 children)

Can confirm bang-prefixed is broken, c-prefixed works. At least from the website UI.

[โ€“] [email protected] 2 points 1 year ago* (last edited 1 year ago)

https://lemmy.ml/c/lemmy is the only on that works for me on Jerboa. Even then it kicks me over to Firefox. Cc [email protected]

[โ€“] [email protected] 3 points 1 year ago* (last edited 1 year ago)

@lemmy
[@]lemmy[@]lemmy[.]ml

Incidentally, this is how you'd find and follow it from, say, Mastodon or Calckey.

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

That is a really cool observation! It always bothered me that I couldn't post after following a link/having to paste to search first.

[โ€“] Akhuyan 3 points 1 year ago

This is a great feature! I wish this could work in the url field too, as I tried that, but it doesn't take that much time to open the body of a post, so it's not really a major issue to worry about though

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

Ok so linking communities and usernames works reliably for me on the web this way:

News - [News](/c/[email protected])
PriorProject - [PriorProject](/u/[email protected])

But how do I universally link a post or comment? The comment ids are different across instances! This comment by @[email protected] for example has a canonical URL (colored pentagram icon):

https://lemmy.world/comment/18453

And the link to it on my instance (chainlink icon):

https://mander.xyz/comment/240478

None of these work:

comment - [comment](/comment/[email protected]) - 404
comment - [comment](/comment/18453) - wrong comment for me comment - [comment](/comment/240478) - works for me but not you
comment - [comment](https://lemmy.world/comment/18453) - works but cannot reply since not logged in

[โ€“] PriorProject 2 points 1 year ago* (last edited 1 year ago) (1 children)

PriorProject - PriorProject

image

I have nothing to add, I've just been summoned. It's confusing, though. I'm not sure anything works consistently in a way that anyone wants across apps and web-ui right now. If people decide on a best-practice, I'd like to read about it in docs or a sticky post. The official docs that show post/comment syntax are silent on referencing communities and mentioning users. This could be an opportunity for a first PR to improve them if someone figures out the best practice.

[โ€“] [email protected] 2 points 1 year ago* (last edited 1 year ago)

Ahaa! effect. Yes of course, as URL handling within the browser will inset your domain automatically. (edit for clarity: web browsers assume a link with a missing domain to go to the same domain/IP as the page the link is on, that's W3C standard -- therefore facepalm).
So, there is a bug in that link-builder popup which comes up as i start to type a [email protected] link, right? It should not create links to the domains directly.

edit: Unfortunately, links to federated posts and comments are still broken because posts synced to other instances get a different ID than the original. Same as with users, there is no unique post ID throughout the federation (no common namespace). Systemic error but probably simple to fix.

Going trough my old comments now. Shouldn't be that much.

load more comments
view more: next โ€บ