Skip to content

Instantly share code, notes, and snippets.

@sebilasse
Last active June 14, 2022 18:43
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/2304017c583ac97f2edefd8f0f922a09 to your computer and use it in GitHub Desktop.
Save sebilasse/2304017c583ac97f2edefd8f0f922a09 to your computer and use it in GitHub Desktop.
Summing up ideas from initial discussion about reply policy

see w3c/activitypub#319 comment by @gobengo


“ 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": "ReplyProfile",
		"describes": "http://www.w3.org/ns/activitystreams#to"
	}
}
// Complex example:
{
	"type": "Event",
	"inReplyToPolicy": [
		{
		  "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"
		}
	]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment