In Activity Streams 2.0, we can represent the result of an activity using the result property. Here, when the actor accepts a Follow activity, the result is that the follower is added to the actor's followers collection.
{
"@context": "https://www.w3.org/ns/activitystreams",
"id": "https://social.example/accept/12931",
"type": "Accept",
"actor": "https://social.example/person/24405",
"to": ["as:Public", "https://other.example/person/21356"],
"object": {
"id": "https://other.example/follow/30360",
"type": "Follow",
"to": ["as:Public", "https://social.example/person/24405"],
"actor": "https://other.example/person/21356",
"object": "https://social.example/person/24405"
},
"result": {
"id": "https://social.example/add/11066",
"type": "Add",
"actor": "https://social.example/person/24405",
"to": ["as:Public", "https://other.example/person/21356"],
"object": "https://other.example/person/21356",
"target": "https://social.example/person/24405/followers"
}
}
My question is: how can the Add activity refer to the activity that caused it? I don't think we have a standard property for this. My best guess right now is context or maybe instrument, neither of which seems ideal. I think an extension inverse property, like resultOf, might be the best option.