#social 2018-09-01

2018-09-01 UTC
#
aaronpk
dariusk[m]: update -- apparently mastodon requires that the content-type header on the webfinger response as well as the actor profile :(
#
aaronpk
er, requires that the content-type header is at least "application/json"
#
aaronpk
webfinger--
#
Loqi
webfinger has -1 karma in this channel over the last year (-3 in all channels)
#
nightpool[m]
that's because there are two valid webfinger representations
#
nightpool[m]
we use content-type to distinguish between them and we fall back to the more common one, which is xml based
#
aaronpk
ah too bad
#
aaronpk
will the xml one work without the right content type header tho?
#
aaronpk
tries it
#
aaronpk
ah bummer it requires the content type for the xml one too
#
dariusk[m]
ah too bad
#
aaronpk
if only I could make the webfinger URL end in .json
#
aaronpk
ah crap i've gotta remember to stop experimenting with this using my actual username, cause it pollutes the caches in mastodon even when the account isn't actually followed by anyone
#
aaronpk
gotta remmeber how to do the delete dance to make broken actors go away
#
aaronpk
ahhh I think I got them all
#
aaronpk
nightpool[m]: what do you think about actually falling back to XML in the webfinger request? since apparently it doesn't do that right now
#
nightpool[m]
aaronpk: file an issue on https://github.com/tootsuite/goldfinger
#
Loqi
[tootsuite] goldfinger: A Webfinger utility for Ruby
#
aaronpk
lol it doesn't care about the mime-type for the host-meta file, but it does care about it for the webfinger file
#
aaronpk
so, only two files are required for this :D -- host-meta, an XML doc that points to "actor.json" -- and actor.json, which contains both the webfinger and activitypub actor JSON bits
ben_thatmustbeme joined the channel
#
aaronpk
look at this beaut. it's both a webfinger response as well as an activitypub actor :D :D https://avocado.lol/.well-known/user.json
#
Loqi
AnAvocado
#
nightpool[m]
> <@irc_aaronpk:cybre.space> look at this beaut. it's both a webfinger response as well as an activitypub actor :D :D https://avocado.lol/.well-known/user.json
#
Loqi
AnAvocado
#
nightpool[m]
wow
#
dariusk[m]
nice!! nightpool me and aaronpk were just talking about this over coffee and he's gone and done it :)
#
aaronpk
interestingly, it displays fine in mastodon because I guess mastodon is displaying the "subject" from the webfinger response? https://media.aaronpk.com/Screen-Shot-2018-08-31-18-54-04-4nEFRz82H1.jpg
#
aaronpk
does anything ever display the actor ID? because that is ugly
#
dariusk[m]
in mastodon, not to my knowledge
#
nightpool[m]
if you don't have a URL property on your actor it will fall back to ID
#
aaronpk
I do have a URL property, but it links to the home page which doesn't have any conneg or anything
#
aaronpk
mastodon is displaying it in the "view full profile" link, which is great
#
aaronpk
I don't know why I can't seem to find a reference to this in the spec, but will every request to the inbox contain an "actor" property that is a string value?
#
aaronpk
I guess that is two separate questions. 1) will there always be an "actor" property, and 2) will that always be a string
#
saranix
yes to the first and no to the 2nd
#
saranix
could be the actor obj expended too
#
saranix
hubzilla does that
#
aaronpk
so in that case, actor.id would be the string URL?
#
nightpool[m]
yes
#
saranix
aaronpk: yep
#
aaronpk
is that documented in activitystreams vocab? I can't figure out what spec that is captured in
#
saranix
I couldn't find anywhere that specifically says it's required, but the alternative would be attributedTo and that does not appear allowed for Activity objects
#
saranix
for what they are, it seems semantically it would just have to be a required property
#
saranix
at any rate, that's how everyone seems to have interpretted it even if it doesn't explicitly say
#
aaronpk
there seems to be a lot of that going on
#
saranix
well, in this case, I think it's 1+1+1 has to = 2
#
saranix
err 3 lol
#
saranix
what a time for my finger to slip
#
saranix
if you have to have an ActivityPub compatible actor in order to deliver (inbox,etc) and some Activity types are explicitly defined to only work if you have that concept, then... well..
xmpp-social, timbl, KevinMarks_, KevinMarks, mattl and taravancil joined the channel
#
stephank
I published the source code for castling.club, if anyone is interested: https://github.com/stephank/castling.club
#
Loqi
[stephank] castling.club: Challenge someone to a game of chess using toots!
KevinMarks and KevinMarks_ joined the channel
#
vasilakisfil
are there any specs on how you can structure your .well-known/webfinger ? what do you have in it ? I know mastodon uses it for instance
#
aaronpk
that doesn't tell you *what* links to put in the response though
#
aaronpk
e.g. what tells you to include a link with type "application/activity+json"
#
nightpool[m]
sure but the question was about structure
#
vasilakisfil
yeah I think I didn't make myself clear, I meant what should we include there, if there is any guide around that, best practices etc
#
nightpool[m]
the only one used for ActivityPub is a rel=me of the correct content type
#
nightpool[m]
either activity+json or json+ld profile=whatever
KevinMarks_ joined the channel
#
vasilakisfil
do you know other social protocols that use webfinger ?
KevinMarks joined the channel
#
nightpool[m]
vasilakisfil: thise are all legacy OStatus properties
#
vasilakisfil
ok
#
vasilakisfil
I am just trying to understand, what problem does webfinger solve. Like when and how should we use it ?
#
stephank
vasilakisfil: Webfinger is used for the translation `kosinus@mastodon.social` -> `https://mastodon.social/users/kosinus`. So looking up actor URLs based on friendly usernames.
#
Loqi
Stéphan Kochen
#
heluecht[m]
vasilakisfil: Diaspora, OStatus, DFRN - they all use webfinger
#
heluecht[m]
I guess best would be to use Webfinger only for the translation user@domain.tld => http://domain.tld/something/user - and not more.
#
heluecht[m]
Webfinger is important, because people can remember mail style addresses much better than some url thingy.
KevinMarks joined the channel
#
saranix
this issue was discussed in this channel many times before. ActivityPub also provides such a translation via the preferredUsername property. No webfinger bs is necessary. The *only* thing that makes it 'necessary' is that mastodon insists on requiring it and they have the largest user share at present time. It is very unfair and uncool of them to break the spec like that but that's the real situation.
#
saranix
and discover is a completely separate issue
#
saranix
*discovery
#
stephank
Does Mastodon use it for anything besides discovery?
#
saranix
stephank: they require it even if they already have the actor url, and they require it to match
#
saranix
dunno if that counts as 'use' since it's pointless :-P
#
saranix
They have other issues too it seems. I've added a webfinger just to get it over with and now maston gives a 500 internal error lol
#
heluecht[m]
saranix: How would you transform from user@domain.tld to http://domain.tld/some/stuff/we/dont/know/user?
#
JasonRobinson[m]
IMHO webfinger is ok but it should be an optional thing nothing to do with federation or required by discovery. It's more of a thing required for certain UX, for those who want to enable searching for people using the email format
#
JasonRobinson[m]
it's not even really something that should be mentioned in a protocol
#
JasonRobinson[m]
and AP doesn't mention it :)
#
aaronpk
I always forget... does the "Create" activity need the "to" on it, or does that go on the object?
#
heluecht[m]
I guess the same rules apply for all activities - and "Announce" does need it.
#
heluecht[m]
And Hubzilla doesn't even have this "to" in the object, only the activity.
#
aaronpk
hm I don't think i'm including it from my main account, but i'm trying a new implementation and something about it isn't working. the posts don't appear in my timeline
#
aaronpk
I do get a 202 response, but I can't see anything after that of course
#
heluecht[m]
Mastodon and Pleroma both have the "to" in the activity and the object.
#
aaronpk
ugh i'm gonna need to install mastodon so I can look at the logs aren't i
#
heluecht[m]
Just in these minutes I'm running some crawler on all outboxes that my system does know. I'm checking the different dialects.
#
heluecht[m]
Do you know some outboxes besides Pleroma, Mastodon and Hubzilla? I would like analyse as much stuff as possible.
#
aaronpk
I didn't bother implementing an outbox cause nobody seemed to read it
#
heluecht[m]
I'm reading it at the moment since I'm preparing a AP parser for Friendica.
#
aaronpk
does anything about this stand out as a reason it wouldn't work? https://gist.github.com/aaronpk/cd8a9d6f06f7be92de4f1e695e80f96b
#
aaronpk
my own other implementation can receive these, so i'm not sure why mastodon can't
#
heluecht[m]
I don't have a running AP server.
#
heluecht[m]
Possibly the problem is that the content is on a different server than the profile?
#
aaronpk
oof i'm gonna be real sad if that's the problem
#
aaronpk
yep, moving the object.id to the same domain worked
#
aaronpk
dariusk[m]: you can now follow AnAvocado@avocado.lol and the posts are delivered from a completely different server :)
#
aaronpk
unfortunately it won't work with a static web host :(
#
dariusk[m]
ah thanks aaronpk
#
aaronpk
what i've been able to gather is: host-meta and user.json files must be served from the real host (can't redirect), each post needs a URL at the real host (can redirect)
#
heluecht[m]
I'm currently trying to see how the message delivery is done. Is it really just a simple POST or is there some needed signature stuff?
#
aaronpk
oh you're in for a treat
#
dariusk[m]
lol
#
aaronpk
heluecht[m]: this is a pretty good guide to the basics of that https://blog.joinmastodon.org/2018/06/how-to-implement-a-basic-activitypub-server/
#
heluecht[m]
Ah okay. I only had got the AP specification - which doesn't help there very much.
#
aaronpk
heh yep
#
heluecht[m]
I have to check whether I can reuse the public and private keys that I already generated for the Friendica and Diaspora communication.
#
saranix
"I always forget... does the "Create" activity need the "to" on it, or does that go on the object?" -> spec says that envelope SHOULD be copied from object to activity during c2s
#
aaronpk
I never bothered to read the c2s section since I don't create stuff that way...
#
saranix
well, technically you are just doing both client and server in one, it still needs to conform
#
aaronpk
what now?
#
aaronpk
no I don't have any activitypub client in here
#
aaronpk
I am just delivering activities to other servers
#
saranix
what ever creates the activity object has a duty to do it correctly
#
aaronpk
how I get the data into my server is nobody else's business
#
aaronpk
I shouldn't have to read the client-to-server section unless I am building... a client
#
saranix
but if your server creates objects then it is a client regardless of what you want to call it.
#
aaronpk
that's...an interesting reframing of the situation
#
aaronpk
in any case, the spec does not make this clear, since it's clearly divided into client and server sections
#
saranix
seems pretty clear and uninteresting to me
#
aaronpk
now if that client section was called "creating activities" that would be a different story
#
aaronpk
but it's clearly called client to server, which I am not doing in any way
#
saranix
server to server only covers federating objects, not creating them... that part is the client part, even if you do it in your server
#
aaronpk
that's what I mean. if that's how it goes then that whole section 6 should not have been called client-to-server
#
aaronpk
since apparently that is talking about creating activities
#
aaronpk
and is important to read even if you are not building a client
#
nightpool[m]
the testing tool makes it very clear that s2s federated servers aren't expected to conform to the c2s server spec
#
nightpool[m]
I don't know where you got that idea saranix, but it's wrong
#
aaronpk
also that section begins with "Client to server interaction takes place through clients posting Activities to an actor's outbox." which... like no
#
aaronpk
I don't have a functioning outbox because it's not required for federating between servers
#
saranix
this is a dumb conversation. obviously it's not routable/deliverable if the envelope is wonky. That's the point. I pointed to the part of the section where it warns of this even though it's common sense.
#
aaronpk
"but the plans were clearly on display ... in the display department"
#
saranix
this is interesting: I got an email that states "invoices will be emailed to you instead of being posted." I'd never heard post used as a verb in that context before. I suppose it makes sense, "post office"... how quaint.
#
aaronpk
i'm seeing a bunch of account delete activities attempting to be delivered to my inbox, but the http signature is failing on them, probably because the account is deleted so fetching the public key fails...
#
aaronpk
is it assumed that I only would care about the delete if i've already seen the public key and have it cached or something? I'm guessing that's how this ends up working with Mastodon
#
dariusk[m]
I'm frankly terrified to look at what is actually coming into my inbox on my little test server and I am putting it off for as long as I can
#
aaronpk
starts investigating pinned toots
#
nightpool[m]
aaronpk: that logic seems sound
#
aaronpk
hopes that is a way to have a toot appear for someone even when that server hasn't seen the actor before
#
aaronpk
nightpool[m]: cool. the way I would have expected this to work is for the Delete to be signed by some sort of system user, but i'm not sure all the pieces are in place for that to happen
#
aaronpk
oh huh there is a "featured" collection on the actor??
#
nightpool[m]
yes
#
aaronpk
will that be fetched before a user is followed?
#
nightpool[m]
"before" is somewhat nebulous
#
nightpool[m]
it's fetched as soon as the actor is processed
#
aaronpk
specifically if someone searches for the profile, I want *something* to appear in the list of posts
#
aaronpk
since old posts won't show up unless someone else on the server has been following them already
#
nightpool[m]
the fetching will happen async but otherwise yes
#
aaronpk
huh how do I trigger stuff to reload the profile photo and such?
#
saranix
I've been wondering that myself
#
saranix
would an explicit Update activity on the actor 'object' trigger it? or would that be ignored
#
saranix
tries to remember to implement handling an update
#
nightpool[m]
yes the Update is the correct thing to do
#
aaronpk
an Update of... the Person object?
#
nightpool[m]
yep
#
aaronpk
can I just send the URL to the person or do I have to actually send the full object?
#
nightpool[m]
should work
#
nightpool[m]
its identical from a json-ld perspective and my memory is that Mastodon is pretty good about handling it properly.