this post was submitted on 04 Jan 2025
27 points (93.5% liked)

Lemmy

12698 readers
25 users here now

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

For discussion about the lemmy.ml instance, go to !meta@lemmy.ml.

founded 4 years ago
MODERATORS
 

From mastodon to follow an account or a community on lemmy you use the @name@server format and there is no difference between a community name and a user-name

so i was wondering if anyone tried and checked what happened

top 25 comments
sorted by: hot top controversial new old
[–] catloaf@lemm.ee 16 points 1 month ago (1 children)

On Lemmy? Nothing, works fine. On Mastodon? Not sure, maybe someone in a Mastodon community would know.

[–] Mannivu@feddit.it 6 points 1 month ago (1 children)

They would be identified by their instance. You can't have two identical usernames in the same instance. So you won't have John@mastodon.social twice. Buy you could have John@mastodon.social and John@mastodon.world, for example.

[–] sugar_in_your_tea@sh.itjust.works 5 points 1 month ago (1 children)

That's not the question though. The question is what if I make a user called "@Lemmy@lemmy.ml" (i.e. this community)? That's probably allowed on Lemmy, but since Mastodon doesn't have the concept of communities in nearly the same way, what would happen?

[–] fmstrat@lemmy.nowsci.com 3 points 1 month ago* (last edited 1 month ago) (1 children)

That's not how Lemmy works. Lemmy uses Actor URLs of https://host.tld/u/user which is referenced via @user@host.tld, and communities are https://host.tld/c/community referenced as [!community@host.tld](/c/community@host.tld). So there is no overlap.

@ex_06@slrpnk.net

!lemmy@lemmy.ml

[–] sugar_in_your_tea@sh.itjust.works 6 points 1 month ago (2 children)

I'm talking about mastodon interacting with Lemmy, not Lemmy interacting with itself.

[–] ex_06 3 points 1 month ago (1 children)

Thank you for taking your time to answer for me!

[–] fmstrat@lemmy.nowsci.com 0 points 1 month ago (1 children)

I don't follow.. Lemmy and Mastodon both require port 443, so a single hostname of lemmy.ml can't run both. Lemmy and Mastodon handle users the same way, just Mastodon doesn't have !communities.

[–] sugar_in_your_tea@sh.itjust.works 3 points 1 month ago (1 children)

I'm talking about a mastodon user referencing a Lemmy community vs a Lemmy user. Mastodon apparently uses the same syntax for both.

[–] fmstrat@lemmy.nowsci.com 0 points 1 month ago

Ohhhh. My understanding is initial @ in Mastodon is only required for users, and would default to user over community, while leaving off the initial @ would do community. I have not validated that in the source, though.

[–] PhilipTheBucket@ponder.cat 10 points 1 month ago (2 children)

What should happen: The backend checks if you're trying to create a community that has the same name as a user, or vice versa, and refuses to do it because that would be confusing, since a lot of ways of referring to an entity on Lemmy use the exact same format for the user and the community.

What does happen: Have fun with confusing!

[–] davel@lemmy.ml 15 points 1 month ago (2 children)

Inside the Lemmyverse and its API, it’s not confusing at all. Outside of the Lemmyverse there be dragons.

[–] PhilipTheBucket@ponder.cat 9 points 1 month ago (2 children)

I made an SMTP server that treats email addresses as case sensitive. When it gets mail for Philip@ponder.cat, it refuses to deliver it to philip@ponder.cat, and it allows users to create himbo@ponder.cat and Himbo@ponder.cat as two distinct addresses. Within my server, it's not confusing at all. Outside of my server, there be dragons.

[–] bhamlin@lemmy.world 1 points 1 month ago (1 children)

You joke, but gmail does this with dots in email. There is no difference to gmail between fartmaster@gmail.com and f.a.r.t.m.a.s.t.e.r@gmail.com. Not really any dragons here, but can create confusion if you're unaware.

[–] bjoern_tantau@swg-empire.de 2 points 1 month ago (1 children)

Nah, Gmail does the exact opposite of what their server does. Gmail is extra lenient with how an address may look. While their server is extra strict.

[–] PhilipTheBucket@ponder.cat 3 points 1 month ago

Correct. Gmail is doing it right, by anticipating how their server's behavior might confuse people or lead to email going to the wrong mailbox, and making extra complexity to make sure the behavior makes sense. Lemmy is doing it wrong, in this instance.

[–] bjoern_tantau@swg-empire.de 1 points 1 month ago (1 children)

You monster!

Now, what happens when one uses different cases in the domain part?

[–] Poach@lemmy.world 3 points 1 month ago

Round robin arbitration.

[–] PhilipTheBucket@ponder.cat 1 points 3 weeks ago (1 children)

Just wanted to let you know: I was trying to resubscribe to !world@lemmy.world so I could say something. I went to the search box, typed "world@lemmy.world", got a bunch of results including world@lemmy.world at the end, clicked on it, but it was the user @world@lemmy.world, not the community. I couldn't find the community in the list.

It's no kind of difficulty to work around the problem, of course. But it was a clear instance of me wanting the software to do something, the software messing up because it's allowing multiple entities with the same identifier to exist, and me having to go back and try another way. It actually couldn't find the community when I limited the search to communities, either, and I had to type the URL. No idea what that's about. But yes, it's a cause of minor malfunctions like this.

[–] davel@lemmy.ml 1 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

When you do a search, the default is “All,” which is why your search results had a bit of everything. If you had chosen “Users” or “Communities” then you would have gotten only users or only communities, respectively.

[–] PhilipTheBucket@ponder.cat 1 points 3 weeks ago (1 children)

It actually couldn’t find the community when I limited the search to communities, either, and I had to type the URL. No idea what that’s about

https://lemmy.ml/search?q=world%40lemmy.world&type=Communities&listingType=All&page=1&sort=TopAll

Notice no community result.

https://lemmy.ml/search?q=world%40lemmy.world&type=All&listingType=All&page=1&sort=TopAll

Also no community result. On my instance, I could scroll to the end of the list, and when the call to the resolve endpoint returns, the user but not the community gets added as a single entry to the very end. Like I say, no idea what that's about, although it seems to be a bug distinct from the bug I'm describing,

https://lemmy.ml/search?q=https%3A%2F%2Flemmy.world%2Fc%2Fworld&type=Communities&listingType=All&page=1&sort=TopAll

Also doesn't work? That's a little strange, honestly. Like I say, no idea. I'm just describing the somewhat different but also wrong behavior I see on my instance.

[–] davel@lemmy.ml 1 points 3 weeks ago (1 children)

You’re putting the instance name ("@lemmy.world") in the search term, which is why the searches are failing. If you already know the user or community you’re looking for, then why would you be searching for it? You already have it!

[–] PhilipTheBucket@ponder.cat 1 points 3 weeks ago

why would you be searching for it? You already have it!

Because the search UI is how Lemmy chooses to expose the concept of resolving a network resource which you may or may not already have synced to your instance. That's, arguably but not definitively to me, a design bug separate from the original design bug I was talking about, or whatever it is that's causing it not to work right now.

You can see by opening up the developer tools and doing a search for world@lemmy.world. It'll submit two requests: One to /api/v3/search, and one to /api/v3/resolve_object. For whatever reason, that second call is only returning the user @world@lemmy.world, but not the community, for me right now. Am I misremembering somehow? This is how I have always located communities, to subscribe to them, when I'm not sure whether they already exist on my server. Typing the full URL https://lemmy.world/c/world still works, and returns what you would expect in the response.

I didn't choose to put that functionality in the "search" UI. The Lemmy developers did. I kind of get the idea behind it, I'm not 100% sure it's a design flaw, but it was definitely surprising to me to find it there, originally.

So tell me: If I "already know the user or community I'm looking for," I know what to type, but it might not exist on my server... how do I subscribe to it? What UI do I use? I know of one answer; if you know of a different answer than the one I'm aware of, it will be news to me.

[–] fmstrat@lemmy.nowsci.com 1 points 1 month ago* (last edited 1 month ago)

What formats are the same? Users are /u and @ while communities are /c and !. No overlap to check for. Mastodon is where the confusion comes in.

[–] n2burns@lemmy.ca 2 points 3 weeks ago* (last edited 3 weeks ago)

We can try it out since there is both @lemmy@lemmy.ml and !lemmy@lemmy.ml

When I searched for lemmy@lemmy.ml on Mastodon (specifically masto.ai), I got the community, not the user. Not sure why, but that's what I got.