activitypub
activitypub copied to clipboard
Inbox Forwarding Clarification
The spec reads:
To do this, the server MUST target and deliver to the values of to, cc, and/or audience if and only if all of the following are true
The values of to, cc, and/or audience contain a Collection owned by the server.
The server MUST only target the values of to, cc, and/or audience on the original object being forwarded
The way the above reads to me is that if any of the to/cc/audience are a Collection owned by the server, then all of the to/cc/audience values on the original object are to be delivered to.
Some suggestions:
To do this, the server MUST examine each value of to, cc, and/or audience and deliver the Activity to it if and only if such a value satisfies all of the following criteria
The to, cc, and/or audience value is a Collection owned by the server.
The server MUST only examine the values of to, cc, and/or audience on the original object being forwarded
For example, given example.com
receiving:
{
type: "Create",
to: [
"http://example.com/addison",
"http://foo.bar/brook"
],
cc: "http://example.com/addison/followers"
}
I think the intention is for example.com
to forward the activity to only http://example.com/addison/followers
, though the language of the spec makes it hard to discern this. Thankfully, the example in the spec does help highlight the intentions.
There are two possible steps we can take here.
- An erratum. We could add an erratum if this text is erroneous or has a gross omission that keeps implementers from correctly implementing this section.
- Further documentation. We could add some clarifying documentation to the AP Primer, which may end up part of a future version of the AP spec.
Of the two, I believe this problem does not rise to the level of a spec error, so I'm leaning towards adding a Primer page on inbox forwarding, and focusing this particular problem (only delivering to locally-hosted collections).
All right, this is updated in the Primer page on replies: https://www.w3.org/wiki/ActivityPub/Primer/Replies#Notifying_addressees_of_replies
There are two ways to do this. The first is inbox forwarding. In this case, when Alice's server social.example receives a reply, it shares it directly with local addressees and with members of any addressed local collection. This only happens under the following conditions:
- The reply addresses a collection on the server, like a list of followers, or a curated list of contacts maintained by the user.
- The reply has an inReplyTo property that matches an object on the server.
When Carol's server delivers the Create activity for her note to Alice's server, these conditions are met, and Alice's server will in turn deliver it to the servers for all of Alice's followers.
Note that Alice's server will not deliver to non-local addressees that aren't members of the local collection; Carol's server is responsible for that.