Skip Navigation

PSA: How to link users & communities so it doesn't break for other instances

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/news@beehaw.org)

News

[My User]/u/barbarian@lemmy.reckless.dev)

My User

You're welcome!

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

  • 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.

  • 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

  • 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 !community@instance.tld 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.

34 comments