Skip to content

Instantly share code, notes, and snippets.

@sebilasse
Last active July 17, 2022 12:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sebilasse/8ef2c615399ce9799ca9cf8a0fefa1ba to your computer and use it in GitHub Desktop.
Save sebilasse/8ef2c615399ce9799ca9cf8a0fefa1ba to your computer and use it in GitHub Desktop.
Who can reply (discuss) in ActivityPub
--- --- ---
see https://github.com/w3c/activitypub/issues/319

“ With that said: Sure, why not have something like:

a vocabulary item that is a property on Objects (same domain as as:inReplyTo) that is like "replyPreferences": "http://your-vocabulary.com/replyPreferences/NONE". There could even be specific pre-baked policy URLs somewhere for "don't reply to me" or "don't reply with curse words" or "don't reply with images" or "don't reply with r-rated images"
language that says clients
SHOULD inform potential repliers about these preferences
MAY prevent replying if the replyPreferences indicate preferring no replies.
language that says that servers
SHOULD try to enforce the replyPreferences when receiving replies in the inbox

” --- --- --- “The Q&A scenario becomes a bit more complex because there is a natural workflow aspect. ”

inReplyToPolicy

PixelFed "commentsEnabled": false, "capabilities": { "announce": "https://www.w3.org/ns/activitystreams#Public", "like": "https://www.w3.org/ns/activitystreams#Public", "reply": null },

DISCUSSION ITEM I author a post, who can reply?

inReplyToPolicy (functional, range: ReplyProfile | ReplyCollection) Class ReplyProfile is a subPropertyOf Profile

inReplyToPolicy MUST be of `ReplyProfile` which
- may have `startTime` and `endTime`
- MUST have `describes` which may be (ordered by precision)
-- an addressed Actor
-- as:actor      only I can reply (the Activity author).
-- as:to         matches only “Primary Audience”, Actors specified in `to`.
-- as:audience 		default behaviour, same as no value at all:
									the Actors that represent the total population of entities
									for which the object can considered to be relevant.
-- :followUnion 	matches people who are following me which I am following.
-- as:following  matches people I am following.
-- as:followers  matches people who are following me.

Anybody who replies must then be an Actor addressed in the audience. If multiple values allow an Actor to reply, then startTime and endTime are determined by the order of precision which means e.g.: as:to is more precise than as:audience.

Examples

// = "Only people in the `to` field can answer":
{
  "type": "Article",
  "name": "»Vögeln, fördern, feuern«",
  "url": "https://www.spiegel.de/wirtschaft/unternehmen/bild-chefredakteur-julian-reichelt-und-die-internen-ermittlungen-voegeln-foerdern-feuern-a-456152ee-eff8-4d8f-9b47-1284b4c36c09?d=1642429358",
  "inReplyToPolicy": {
    "type": "Collection",
    "items": [{
      "type": "ReplyProfile",
      "describes": "http://www.w3.org/ns/activitystreams#to"
    }]
  }
}
// Complex example:
{
  "type": "Event",
  "inReplyToPolicy": {
    "type": "Collection",
    "items": [{
      "type": "ReplyProfile",
      "summary": "appellant Max can answer",
      "describes": { "type": "Person", "name": "Max Schrems" }
    }, {
      "type": "ReplyProfile",
      "summary": "accused Meta can answer until 4th of July",
      "describes": { "type": "Organization", "name": "Meta Platforms, Inc." },
      "endTime": "2022-07-04T06:00:00-08:00"
    }]
  }
}
@macgirvin
Copy link

Just wanted to point out that we currently allow the comment policy to be changed for any post/conversation (just like the audience), and tying this specific policy to the actor level appears to preclude this kind of granular setting.

@sebilasse
Copy link
Author

@macgirvin Yep, all cited policies are at the Object level of course.
The domains/ranges/subclassOf are yet just in the OWL file, need to rewrite it to SKOS soon.
What I meant was specific for ReviewPolicy (in reply to Arnold).
In the world where I come from, a ReviewPolicy is what The Associated Press, NYT or Der Spiegel defines as an Organisation-wide Policy for all published things (correct me if a different thing was meant).
Also: What would a RetentionPolicy specify, what we can't do with AP directly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment