#social 2018-09-15

2018-09-15 UTC
martijnvdven, sknebel, cwebber2, xmpp-social and cdchapman joined the channel
#
heluecht[m]
How does a "Accept" for a "Follow" request has to look like exactly? Mastodon doesn't accept my tests.
#
nightpool[m]
does it reject it with an error?
#
nightpool[m]
or does it accept it, and nothing happens?
#
heluecht[m]
The second one.
#
nightpool[m]
Okay, that means your HTTP signatures are working but there's something wrong with the activity
#
heluecht[m]
I'm doing a contact request from Mastodon and I'm sending an "Accept". But Mastodon still tells me that it is waiting for an answer.
#
nightpool[m]
can you put the activity you're sending in a snippet?
#
heluecht[m]
The signatures do work fine.
#
heluecht[m]
What do you mean with "snippet"?
#
nightpool[m]
Like a code block I guess
#
nightpool[m]
just here in riot
#
nightpool[m]
or gist.github.com or whatever
#
heluecht[m]
Ah okay. One second.
#
nightpool[m]
i was gonna say gist but then i remembered riot is actually good at sharing code :D
#
heluecht[m]
{"@context":"https://www.w3.org/ns/activitystreams","id":"https://pirati.ca/activity/ec05b9d60c9d2001","type":"Accept","actor":"https://pirati.ca/profile/test5","object":{"id":"https://pirati.ca/activity/ec05b9d60c9d1b99","type":"Follow","actor":"https://pirati.ca/profile/test5","object":"https://mastodon.social/users/heluecht"}}
#
nightpool[m]
can you put it in a code block next time so it's a little easier to read?
#
heluecht[m]
How do I do this?
#
nightpool[m]
sent a long message: nightpool[m]_2018-09-15_19:44:11.txt <https://matrix.cybre.space/_matrix/media/v1/download/cybre.space/wZRdodBcWpmzXifadBBvZinG>
#
nightpool[m]
hmm that didn't work
#
nightpool[m]
sent a long message: nightpool[m]_2018-09-15_19:44:22.txt <https://matrix.cybre.space/_matrix/media/v1/download/cybre.space/LVZJJOrmYBrsjVAnIYAsYgMm>
#
nightpool[m]
like that
#
nightpool[m]
matrix supports markdown
#
heluecht[m]
I'm not good at Markdown. What do I have to do?
#
nightpool[m]
It looks like your follow activity is backwards
#
nightpool[m]
three backticks
#
nightpool[m]
sent a long message: nightpool[m]_2018-09-15_19:45:10.txt <https://matrix.cybre.space/_matrix/media/v1/download/cybre.space/vNBgCrbpFBFyDdOrgmbzWCkJ>
#
heluecht[m]
I just saw that the Id is weird.
#
heluecht[m]
Does it have to be the id of the original request?
#
nightpool[m]
so it looks like you're sending a Accept activity for you following someone on mastodon
#
nightpool[m]
also yes it should be the id of the original request
#
heluecht[m]
Oh, I reversed it?`
#
nightpool[m]
yeah
#
heluecht[m]
Should or must?
#
nightpool[m]
well, i mean, if it's not the same ID then it's a different document
#
nightpool[m]
i don't know how many implementations care about the identity of the document vs caring about the contents
#
nightpool[m]
Ideally you should just embed the entire Follow request verbatim
#
nightpool[m]
so it's just `{type: Accept, id: whatever, actor: <your actor id>, object: <the Follow activity>}`
#
heluecht[m]
Whatever "Verbatim" does mean. I only know some company with that name.
#
nightpool[m]
verbatim means "as-is"
#
heluecht[m]
Currently I don't save the follow request. Only the id.
#
nightpool[m]
that's fine.
#
nightpool[m]
as long as the id, actor, and object are correct the follow request should be fine.
#
nightpool[m]
i'm just saying that it's a shortcut if you care
#
heluecht[m]
Okay. I will do some tests with reversed actor and object and test again.
vt joined the channel
#
heluecht[m]
I guess It's the same with "Undo"? That the "object" in the object is the "actor" in the activity?
#
nightpool[m]
hmm?
#
nightpool[m]
I'm not sure I follow
vt left the channel
#
nightpool[m]
Why would it be the same for Undo?
#
nightpool[m]
If user A follows user B, then user B has to accept.
#
nightpool[m]
when user b is followed, they're the object, and the actor is user A.
#
nightpool[m]
when user b accepts, they're the actor, and the object is the follow request
#
nightpool[m]
A follows B
#
nightpool[m]
B accepts (A follows B)
#
heluecht[m]
I'm sitting at the stuff now for around 14 hours, sorry for weird questions ;-)
#
nightpool[m]
no worries. take a break, maybe :D
#
heluecht[m]
I only have the weekends.
#
heluecht[m]
BTW: at the same time I'm watching an old tv series ("Buffy").
#
nightpool[m]
buffy is great
#
heluecht[m]
Yeah, currently SyFy is showing 3 episodes per day. I'm recording them and watch them at the weekend - while coding.
#
JasonRobinson[m]
heluecht: just out of interest, are you storing (and thus also generating) activities also in friendica, or just generating a unique activity ID on the fly when sending? I'm sort of on the fence for socialhome whether to store activities or just generate a unique one on the fly by probably adding the activity as for example "#create" after the object ID
#
heluecht[m]
I'm not storing activity ids, only object ids.
#
JasonRobinson[m]
what would happen in your above example if someone looked up `https://pirati.ca/activity/ec05b9d60c9d2001` which is the activity ID?
#
heluecht[m]
404
#
JasonRobinson[m]
it's possible someone might not accept the activity unless they can "call back" and verify it - for example if they don't use http signatures. But for mastodon compat I guess it's fine. AP doesn't define these very well, but I think in general ID's are supposed to resolve (it's in spec). That is why fragment ID's are kinda ok because you can always wrap it in "Create" if the activity ID has the "#create" fragment. I think that is how mastodon
#
JasonRobinson[m]
works too nightpool ?
#
nightpool[m]
hmm
#
nightpool[m]
i know that we just changed this recently due to feedback from pleroma
#
heluecht[m]
nightpool: It does work now for "accept"
#
nightpool[m]
I can't remember exactly what the new decision was
#
JasonRobinson[m]
if it was feedback about fragment id's then would love to read it. just making decision whether to store activities in some way or not 😅 I'll try look in the mastodon tracker
#
nightpool[m]
https://github.com/tootsuite/mastodon/pull/7160 is the PR I was remembering
#
Loqi
[Gargron] #7160 Store URIs of follows, follow requests and blocks for ActivityPub
#
nightpool[m]
heluecht: glad to hear it's working!
#
JasonRobinson[m]
ok thanks 👍
cdchapman and up201705417 joined the channel
#
heluecht[m]
Does someone know which activity I have to end to remove someone as a follower?
#
nightpool[m]
heluecht: Undo the accept activity, i think is the most supported way
#
heluecht[m]
Would this switch back into the state before the accept or would this remove the contact request as well?
#
nightpool[m]
i'd assume the latter
#
nightpool[m]
but you could maybe send a Reject instead of undoing the accept
#
nightpool[m]
i think mastodon supports both
#
nightpool[m]
(they basically do the same thing for mastodon)
#
heluecht[m]
Reject sounds more logical to me.
#
heluecht[m]
What is the exact structure of the "reject" activity? Means: What has to be in the object?
#
nightpool[m]
it's the exact same as an accept
#
nightpool[m]
{type: "Accept", actor: "person being followed", object: "Follow activity"}
#
JasonRobinson[m]
huh, now I wish we just had "Unfollow" :/
#
nightpool[m]
we don't have any Un- activities because they're superseded by Undo { Activity }
#
nightpool[m]
but Unfollow isn't the same as soft-blocking someone
#
JasonRobinson[m]
well, this certainly does mean one has to store the activities
#
nightpool[m]
or their ID
#
JasonRobinson[m]
well yeah, when I mean activity I mean ID at minimum
#
nightpool[m]
we just have a uri property on the Follow table
#
heluecht[m]
This one here doesn't work:
#
heluecht[m]
sent a long message: heluecht[m]_2018-09-15_22:14:42.txt <https://matrix.cybre.space/_matrix/media/v1/download/cybre.space/XAhXfXdMfHbMwKxetGlqoPUE>
#
nightpool[m]
no, you're not rejecting the person
#
nightpool[m]
you have to reject the follow activity
#
nightpool[m]
just like you would have to accept the follow activity
#
nightpool[m]
sorry for being unclear
#
JasonRobinson[m]
heluecht: this is why I asked you do you generate the activity ID's on the fly :)
#
heluecht[m]
It's now working fine.