#social 2019-03-19

2019-03-19 UTC
timbl, Guest84_, vitalyster, xmpp-social and Simounet joined the channel
#
Simounet
Hello there, I'm trying to implement ActivityPub and I saw that https://test.activitypub.rocks/ looks broken. I'm not sure this is the right place to about this, so…
#
cjslep[m]
Yep, cwebber is who you want to bug
#
Simounet
cjslep[m]: Ok, thanks. :)
#
Simounet
cwebber2 maybe. :p
#
cjslep[m]
May I ask what implementation you're working on? My curiosity.
#
Simounet
cjslep[m]: I'm just playing around at the moment, nothing serious.
#
Simounet
There is more and more projects using it so I think it's a plus to understand it correctly.
#
fr33domlover
Hey cjslep[m]! I was looking at the as2 namespace files, wondering how preferredUsername came to be (and why it's not the same as 'name'). I couldn't find info but I noticed that in W3C's AS2 repo, the jsonld context contains preferredUsername while their .owl file doesn't - and I recalled you're using OWL to generate code and you'd want to be sure the OWL is up to date etc. :)
decentral1se and decentral1se1 joined the channel
#
fr33domlover
In my web app there are projects, and project has a canonical unique name (e.g. gnu-hello) and an arbitrary name text (e.g. GNU Hello). Which ActivityPub properties would I use for these?
#
fr33domlover
There's preferredUsername and name, but the former doesn't really match
#
fr33domlover
Because it's not a user's name, it's a project name
#
fr33domlover
I couldn't find any other relevant property
#
fr33domlover
looks at the spec
#
fr33domlover
I'm going to abuse preferredUsername for now
#
fr33domlover
Hmmm what if called this property "slug"
#
fr33domlover
*if we
#
cjslep[m]
fr33domlover I use my own OWL definition. :) Which is guess isn't a good sign :(
#
cjslep[m]
I wasn't there when preferredUsername came to be but it is intended to be a non-unique display name representing a user. Whereas 'name' could be for any ol' Object, not necessarily a user
#
cjslep[m]
I'd imagine the canonical name is longer than just 'gnu-hello' since that doesn't distinguish between different federated 'gnu-hello' instances so that sounds more like a 'id' to me
#
cjslep[m]
Of course your UI could parse out the uninteresting bits and display a substring of the 'id' and then the projects 'name'.
#
cjslep[m]
But under the hood the UI would still have a ref to the full 'id' to do client requests with
#
fr33domlover
cjslep[m], my server could store an ID URI and display a stripped version, but how can other servers do that? They don't know which part of the URI is interesting. They could make a guess, say, take the last segment of the URI path, but there's no guarantee. Maybe I'll just use 'name', and put 'gnu-hello' as the name if the user doesn't set it manually etc.
#
fr33domlover
But otherwise, we don't have a preferredUsername equivalent for things that aren't a user
#
fr33domlover
I think I'll use "slug" for that, for now
#
cjslep[m]
fr33domlover a federated 'id' shouldn't be parsed for interesting bits, only ones locally owned. Otherwise users won't be able to tell which resource is local and which is a federated spoof of a local resource.
#
cjslep[m]
I fear you are on the path of the home server displaying its 'gnu-hello', a 'gnu-hello' owned by server B, a 'gnu-hello' owned by server C, ... Etc. Maybe you have another way to allow users to disambiguate though...
#
fr33domlover
cjslep[m], hmmmm that makes it even worse then :P So "slug" / "username" shouldn't be guessed; if it's needed, it should be explicitly provided. Idk if I'll strictly need it, but it seems that there's no AP/AS2 propety for it (preferredUsername works but it's only for users)
#
cjslep[m]
I'm suggesting exactly how Mastodon handles usernames
#
cjslep[m]
Local IDs are specially parsed so others on mastodon.technology see me as only @cj
#
cjslep[m]
Others outside of that server see me as @cj@mastodon.technology
#
cjslep[m]
Yet everyone sees my preferredUsername of "CJ"
#
fr33domlover
Yeah that's what I'm doing :) But imagine you see stuff where the actor is a project, not a user. It would be nice to still display that "CJ" part, except preferredUsername is a misleading property to use here because it's not a username, it's a projectname
#
fr33domlover
cjslep[m],^
#
cjslep[m]
'name' and 'id' or webfinger sgtm
#
jdormit[m]
fr33domlover: I think preferredUsername is what you are looking for here. Are projects actors?
#
fr33domlover
jdormit, it doesn't matter if they're actors, I'm just saying that if I wanted for any reason to have a "slug" property, there's none in ActivityPub. There's preferredUsername but it only applies to users, not to other things that have a username-like property
#
fr33domlover
I'll use "name" and if thats not enough, I'll use a custom "slug" property
timbl joined the channel
#
fr33domlover
(name isn't enough if you need to pass both a slug and an arbitrary potentially multi-language long name with possible spaces and emoji etc. whatever)
#
cjslep[m]
fr33domlover isn't 'name' a natural language property so you can just use 'nameMap'
decentral1se, dmitriz, Luke_, timbl and timbl_ joined the channel
#
fr33domlover
cjslep yes there's name and nameMap but they mean the same thing, I'd use one of them for the 2nd role but there's no property for the "slug" thing :P
#
fr33domlover
Anyway , I'll see if I need one :)
dmitriz and timbl joined the channel