Hi,
I just want to make sure I have understood everything correctly. If not, please correct me.
When a user wants to join a group, the client publishes a join activity to the user’s outbox, with the user as the actor, the group as the object, and the group as the recipient (to)?
{
"@context": ["https://www.w3.org/ns/activitystreams",
{"@language": "en"}],
"type": "Join",
"actor": "https://some-social-network.org/alice",
"name": "Alice joins 'Example Group'",
"object": "https://other-network.co.uk/groups/example-group",
"to": ["https://other-network.co.uk/groups/example-group"],
}
The server then looks up the group’s actor object to get its inbox and sends the activity to it. The group’s server must now add the user to a collection (is there a collection like members, or should I use followers here?) and post an accept activity to the server’s outbox (or, if the user is not added to a collection, post a reject activity).
{
"@context": ["https://www.w3.org/ns/activitystreams",
{"@language": "en"}],
"type": "Accept",
"actor": "https://other-network.co.uk/groups/example-group",
"name": "Alice joined 'Example Group'",
"object": {
"type": "Join",
"actor": "https://some-social-network.org/alice",
"object": "https://other-network.co.uk/groups/example-group",
},
"to": ["https://some-social-network.org/alice",
"https://other-network.co.uk/groups/example-group/followers/"]
}
I am also wondering: Should the user’s server match the accept/reject activity with the previous join activity? And should I use IDs here for faster lookup?
I am also considering edge cases where accepting/rejecting is a manual process and a user might revoke their join activity before a response is received.