w3c / activitypub

http://w3c.github.io/activitypub/
Other
1.22k stars 77 forks source link

Use of "reference" with `inbox` and `outbox` #289

Open cjslep opened 6 years ago

cjslep commented 6 years ago

For inbox and outbox the specification says:

Actor objects MUST have, in addition to the properties mandated by 3.1 Object Identifiers, the following properties:

inbox A reference to an [ActivityStreams] OrderedCollection comprised of all the messages received by the actor; see 5.2 Inbox. outbox An [ActivityStreams] OrderedCollection comprised of all the messages produced by the actor; see 5.1 Outbox.

A reference is implicitly understood to mean a URI that, when resolved as stated in ActivityPub, will yield an OrderedCollection. Thus, this says that the inbox must be a URI.

However, for the outbox it specifically omits the word reference, which heavily implies the actual OrderedCollection must be embedded within the actor.

This kind of imprecise use of language, coupled with the permissiveness of ActivityStreams, implies that Example 9 is incorrect:

{
  "@context": ["https://www.w3.org/ns/activitystreams",
               {"@language": "ja"}],
  "type": "Person",
  "id": "https://kenzoishii.example.com/",
  "following": "https://kenzoishii.example.com/following.json",
  "followers": "https://kenzoishii.example.com/followers.json",
  "liked": "https://kenzoishii.example.com/liked.json",
  "inbox": "https://kenzoishii.example.com/inbox.json",
  "outbox": "https://kenzoishii.example.com/feed.json",
  "preferredUsername": "kenzoishii",
  "name": "石井健蔵",
  "summary": "この方はただの例です",
  "icon": [
    "https://kenzoishii.example.com/image/165987aklre4"
  ]
}

Please either omit "reference" when describing the inbox, permitting implementors to inline the OrderedCollections or not, or standardize "reference" to mean inlining the actual ActivityStream data is not permitted.

chronologicaldot commented 6 years ago

I think it may be an omission from the description of "outbox". Both should probably say "reference", but perhaps the author thought it might be implied? If both are a reference (URI), then the example would make sense.

aschrijver commented 6 years ago

I was just as confused as @cjslep by this text.

Furthermore for followers, following and liked the specification mentions that these represent 'A link to an [ActivityStreams] collection' which implies it can contain either a URI or a Link entity.

And a bit further it mentions stream with only the text 'A list of supplementary Collections which may be of interest.'. Is this meant to be an array of URI's?

IMHO the specification would be much clearer if the new properties of ActivityPub were more clearly explained, such as the entities and properties in ActivityStreams Vocabulary (i.e. in tabular format).

evanp commented 1 year ago

The correct type for all of these properties, inbox, outbox, etc. is either in-line or an URI. I agree that the language is confusing.

I think this should be documented in the Errata, with an example of inline and URI versions of inbox and outbox.

gobengo commented 1 year ago

+1 making the language consistent between inbox/outbox