-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
493 lines (485 loc) · 20.9 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>ActivityPub Miscellaneous Terms</title>
<script src="https://www.w3.org/Tools/respec/respec-w3c" class="remove" defer></script>
<script class="remove">
// All config options at https://respec.org/docs/
var respecConfig = {
specStatus: "CG-DRAFT",
editors: [{ name: "Evan Prodromou", url: "https://socialwebfoundation.org/@evanp" }],
github: "swicg/miscellany",
shortName: "apmisc",
xref: ["web-platform", "activitystreams-vocabulary", "activitystreams-core", "activitypub"],
group: "socialcg",
};
</script>
<style>
table td,
table td * {
vertical-align: top;
}
</style>
</head>
<body>
<section id="abstract">
<p>
This specification documents miscellaneous terms used for ActivityPub
and defined in the Activity Streams 2.0 namespace.
</p>
</section>
<section id="sotd">
<p>This is required.</p>
</section>
<section class="informative">
<h2>Introduction</h2>
<p>
The first software packages that implemented the [[activitypub]] protocol
federation protocol began to appear in 2018. <a href="https://joinmastodon.org/">Mastodon</a>, a federated
microblogging service, had previously implemented the <a href="https://en.wikipedia.org/wiki/OStatus">OStatus</a>
protocol. It was ported over to using ActivityPub.
</p>
<p>
As it was, the Mastodon team included a number of terms that the software needed to implement Mastodon features
not defined in basic ActivityPub. Some terms were proposed for inclusion in the ActivityPub specification, but weren't included because of time constraints.
</p>
<p>
In the absence of a clear extensions process, those terms were not given their own namespace or context document, but instead were defined in the default namespace for Activity Streams 2.0.
They also were not given their own [[JSON-LD]] context document, instead defined in the <code>@context</code>
property of each ActivityPub object.
</p>
<p>
The terms have been widely adopted by other ActivityPub implementations.
Newer Mastodon-specific extensions have been defined in Mastodon's own namespace. The first few terms, though,
remain undocumented in a formal specification.
</p>
<p>
The <a href="https://www.w3.org/community/socialcg/">SocialCG</a> at the W3C is responsible for managing resources
like the ActivityPub and Activity Streams 2.0 errata and context document. Its proposed <a
href="https://swicg.github.io/extensions-policy/">Process for Including Extensions in Activity Streams 2.0</a>
gives a path for widely-used extension terms to be included in the context document.
</p>
<p>
The terms in this Report are good candidates for that process, but miss a few key criteria. They are not defined in their own namespace. They also miss the criteria of being well-documented, and having their own context
document at a permanent URL.
</p>
<p>
Changing the namespace for the terms would change their meaning and would not be backwards compatible. So, the current report aims to fix the two latter problems. It describes a context document for the terms, and
defines each of the terms in a similar way to the [[activitystreams-vocabulary]] specification.
</p>
<p>
Besides documenting these terms and giving them a path to inclusion in the Activity Streams 2.0 context document, this specification also serves as a test case for the SocialCG extension inclusion process.
</p>
</section>
<section id="context">
<h2>Context</h2>
<p>
The terms in this document are defined in a context document that can be used in [[JSON-LD]] documents. The
context document is available at <a
href="https://purl.archive.org/miscellany">https://purl.archive.org/miscellany</a>.
</p>
<p>To use these terms, documents should include this context URL in the
<code>@context</code> property of the JSON-LD document.
</p>
<aside class="example">
<p>Example usage of the context.</p>
<pre class="json">
{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://purl.archive.org/miscellany"
],
"id": "https://example.com/users/evan",
"type": "Person",
"name": "Evan Prodromou",
"manuallyApprovesFollowers": false
}
</pre>
</aside>
<p>
For backwards compatibility, the context document does <i>not</i> define a separate namespace nor a prefix for
these terms, instead falling back to the Activity Streams 2.0 defaults. If needed for
disambiguation, the <code>as:</code> prefix defined in the
Activity Streams 2.0 context document can be used.
</p>
<section>
<h3>Version-stamped URLs</h3>
<p>Because this extension documents a finite set of historically-defined
properties and types, it is unlikely that many changes
will be made to the context document.</p>
<p>Nevertheless, to ease the use of
this context for implementers with strict versioning requirements,
additional URL aliases are provided with versions included. A <a href="https://semver.org/">semantic versioning</a>
strategy is used to convey the guarantees of the version number.
</p>
<table>
<tbody>
<tr>
<th>Version</th>
<th>URL</th>
<th>Notes</th>
</tr>
<tr>
<td>(latest)</td>
<td><a href="https://purl.archive.org/miscellany">https://purl.archive.org/miscellany</a>
</td>
<td>The latest version of the context is always available at this URL. Most implementers can use this URL.</td>
</tr>
<tr>
<td>1.0.0</td>
<td><a
href="https://purl.archive.org/miscellany/1.0.0">https://purl.archive.org/miscellany/1.0.0</a>
</td>
<td>The exact version of the context document. The resource at this URL should be immutable. This URL is useful
for implementers that
need an exact, byte-wise replicable version of the document.
</td>
</tr>
<tr>
<td>1.0.x</td>
<td><a
href="https://purl.archive.org/miscellany/1.0">https://purl.archive.org/miscellany/1.0</a>
</td>
<td>Backwards-compatible fixes are possible, but no additional types or properties are defined. This is useful
for implementers
that use multiple extensions and want to ensure that no
conflicting terms are added.
</td>
</tr>
<tr>
<td>1.x.x</td>
<td><a
href="https://purl.archive.org/miscellany/1">https://purl.archive.org/miscellany/1</a>
</td>
<td>Backwards-compatible fixes, additional types and properties are possible. This is useful for implementers
that want to ensure
that the properties and types they use are stable and will not change, but do not need to avoid term
conflicts.
</td>
</tr>
</tbody>
</table>
<p>Using the version-stamped context URLs is similar to the unstamped URL.</p>
<aside class="example">
<p>Example usage of a version-stamped context URL.</p>
<pre class="json">
{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://purl.archive.org/miscellany/1.0"
],
"id": "https://example.com/users/evan",
"type": "Person",
"name": "Evan Prodromou",
"manuallyApprovesFollowers": false
}
</pre>
</aside>
<p>No backwards-incompatible changes to this context are anticipated. However, if those changes were made, a new major
version (2.x.x) would be added and the existing 1.x.x URLs would continue to be provided.</p>
</section>
</section>
<section id="types">
<h2>Types</h2>
<p>This extension includes one object type, <a href="#Hashtag">Hashtag</a>.</p>
<section id="Hashtag" data-dfn-for="Hashtag">
<h3>Hashtag</h3>
<table>
<tbody>
<tr>
<td width="10%">
URI:
</td>
<td>
<code>https://www.w3.org/ns/activitystreams#Hashtag</code><br>
<code>as:Hashtag</code><br>
<code>Hashtag</code>
</td>
</tr>
<tr>
<td>
Notes:
</td>
<td>
<p>
A metadata tag used for casual categorization of content. Often, a hashtag is presented inline in
content prefixed with a hash symbol, "#". See <a
href="https://en.wikipedia.org/wiki/Hashtag">https://en.wikipedia.org/wiki/Hashtag</a>. Examples are
shown in the [[activitystreams-vocabulary]] specification under
<a href="https://www.w3.org/TR/activitystreams-vocabulary/#microsyntaxes">Mentions, Tags, and Other Common
Social Microsyntaxes</a> implementation notes, without a type for tag object.
Original discussion in ActivityPub issue #<a href="https://github.com/w3c/activitypub/issues/235">235</a>.
</p>
<p>
The <code>name</code> property MAY include an initial hash character "#".
</p>
<p>
Some processors treat Hashtag objects with the same <code>name</code> as equivalent, with or without the initial hash character. For example, an aggregator service may list all objects with <code>tag</code> items of type <code>Hashtag</code> with the same <code>name</code> together, even if their <code>href</code> values differ.
</p>
<p>
Despite the name, the Hashtag type MAY be used for metadata tags that are not implemented with inline microsyntax. See <a href="https://en.wikipedia.org/wiki/Tag_(metadata)">https://en.wikipedia.org/wiki/Tag_(metadata)</a>.
</p>
</td>
</tr>
<tr>
<td>Extends:</td>
<td><code><a href="https://www.w3.org/TR/activitystreams-core/#link">Link</a></code></td>
</tr>
<tr>
<td>Properties:</td>
<td>Inherits all properties from <code><a href="https://www.w3.org/TR/activitystreams-core/#link">Link</a></code>.</td>
</tr>
</tbody>
</table>
<aside class="example">
<p>A <a href="https://www.w3.org/TR/activitystreams-vocabulary/#dfn-note">Note</a> with a <code>Hashtag</code> in its <a href="https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tag">tag</a> array.</p>
<pre class="json">
{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://purl.archive.org/miscellany"
],
"id": "https://example.com/notes/1",
"type": "Note",
"attributedTo": "https://example.com/users/john",
"summary": "A thank-you note",
"content": "<a href='https://example.org/tags/givingthanks'>#givingthanks</a>",
"tag": [
{
"type": "Hashtag",
"href": "https://example.org/tags/givingthanks",
"name": "#givingthanks"
}
]
}
</aside>
<aside class="example">
<p>A collection of <a href="https://www.w3.org/TR/activitystreams-vocabulary/#dfn-image">Image</a> objects with <code>Hashtag</code> objects in their <a href="https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tag">tag</a> array. The images are grouped together
because the hashtag <code>name</code> values are equivalent.</p>
<pre class="json">
{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://purl.archive.org/miscellany"
],
"id": "https://photos.example/collections/tag/givingthanks",
"attributedTo": "https://photos.example/editors/asjt",
"to": "as:Public",
"type": "Collection",
"summary": "Images tagged with #eclipse2024",
"items": [
{
"id": "https://example.com/images/1",
"type": "Image",
"name": "Fred and Ethel watching the eclipse",
"attributedTo": "https://example.com/users/ethel",
"to": "as:Public",
"url": "https://example.com/files/image1.png",
"tag": [
{
"type": "Hashtag",
"href": "https://example.com/tags/eclipse2024",
"name": "eclipse2024"
}
]
},
{
"id": "https://social.example/users/nasa/images/2e4f8e6c.jsonld",
"type": "Image",
"url": "https://social.example/uploads/2e4f8e6c.png",
"attributedTo": "https://social.example/users/nasa",
"to": "as:Public",
"name": "Eclipse from the ISS",
"summary": "<a href='https://tags.example/eclipse2024'>#eclipse2024</a>",
"tag": [
{
"type": "Hashtag",
"href": "https://tags.example/eclipse2024",
"name": "#eclipse2024"
}
]
}
]
}
</aside>
</section>
</section>
<section id="properties">
<h2>Properties</h2>
<p>This extension includes three properties: <a href="#manuallyApprovesFollowers">manuallyApprovesFollowers</a>, <a href="#movedTo">movedTo</a>, and <a href="#sensitive">sensitive</a>.</p>
<section id="manuallyApprovesFollowers" data-dfn-for="manuallyApprovesFollowers">
<h3>manuallyApprovesFollowers</h3>
<table>
<tbody>
<tr>
<td width="10%">
URI:
</td>
<td>
<code>https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers</code><br>
<code>as:manuallyApprovesFollowers</code><br>
<code>manuallyApprovesFollowers</code>
</td>
</tr>
<tr>
<td>
Notes:
</td>
<td>
When *true*, conveys that for this actor, follow requests are not usually automatically approved, but instead are examined by a person who may accept or reject the request, at some time in the future. Setting of FALSE conveys no information and may be ignored. This information is typically used to affect display of accounts, such as showing an account as private or locked.
</td>
</tr>
<tr>
<td>Domain:</td>
<td><code>Object</code> (an ActivityPub <a href="https://www.w3.org/TR/activitypub/#actors">Actor</a>)</td>
</tr>
<tr>
<td>Range:</td>
<td><code>Boolean</code></td>
</tr>
<tr>
<td>Functional:</td>
<td><code>true</code></td>
</tr>
</tbody>
</table>
<aside class="example">
<p>An ActivityPub actor with the <code>manuallyApprovesFollowers</code> flag set to true.</p>
<pre class="json">
{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://purl.archive.org/miscellany"
],
"id": "https://example.com/users/alyssa",
"type": "Person",
"name": "Alyssa P. Hacker",
"inbox": "https://example.com/users/alyssa/inbox",
"outbox": "https://example.com/users/alyssa/outbox",
"followers": "https://example.com/users/alyssa/followers",
"following": "https://example.com/users/alyssa/following",
"liked": "https://example.com/users/alyssa/liked",
"manuallyApprovesFollowers": true
}
</pre>
</aside>
</section>
<section id="movedTo" data-dfn-for="movedTo">
<h3>movedTo</h3>
<table>
<tbody>
<tr>
<td width="10%">
URI:
</td>
<td>
<code>https://www.w3.org/ns/activitystreams#movedTo</code><br>
<code>as:movedTo</code><br>
<code>movedTo</code>
</td>
</tr>
<tr>
<td>
Notes:
</td>
<td>
Signifies that an actor has been moved to a different ID. Used in Mastodon-style data portability with the <a href="https://www.w3.org/TR/activitystreams-vocabulary/#dfn-move">Move</a> activity; see <a href="https://swicg.github.io/activitypub-data-portability/#move-action">ActivityPub Data Portability/Move Action</a> for more details.
</td>
</tr>
<tr>
<td>Domain:</td>
<td><code>Object</code> (an ActivityPub <a href="https://www.w3.org/TR/activitypub/#actors">Actor</a>)</td>
</tr>
<tr>
<td>Range:</td>
<td><code>Object</code> (an ActivityPub <a href="https://www.w3.org/TR/activitypub/#actors">Actor</a>)</td>
</tr>
<tr>
<td>Functional:</td>
<td><code>true</code></td>
</tr>
</tbody>
</table>
<aside class="example">
<p>An ActivityPub actor with the <code>movedTo</code> property set to a new ID.</p>
<pre class="json">
{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://purl.archive.org/miscellany"
],
"id": "https://example.com/users/alyssa",
"type": "Person",
"name": "Alyssa P. Hacker",
"inbox": "https://example.com/users/alyssa/inbox",
"outbox": "https://example.com/users/alyssa/outbox",
"followers": "https://example.com/users/alyssa/followers",
"following": "https://example.com/users/alyssa/following",
"liked": "https://example.com/users/alyssa/liked",
"movedTo": "https://example.org/users/alyssa2"
}
</pre>
</aside>
</section>
<section id="sensitive" data-dfn-for="sensitive">
<h3>sensitive</h3>
<table>
<tbody>
<tr>
<td width="10%">
URI:
</td>
<td>
<code>https://www.w3.org/ns/activitystreams#sensitive</code><br>
<code>as:sensitive</code><br>
<code>sensitive</code>
</td>
</tr>
<tr>
<td>
Notes:
</td>
<td>
The <code>sensitive</code> property (a boolean) on an object indicates that some users may wish to apply discretion about viewing its content, whether due to nudity, violence, or any other likely aspects that viewers may be sensitive to. This is comparable to what is popularly called "NSFW" (Not Safe For Work) or "trigger warning" in some systems. Implementations may choose to hide content flagged with this property by default, exposed at user discretion. Original discussion in ActivityPub issue #<a href="https://github.com/w3c/activitypub/issues/231">231</a>.
</td>
</tr>
<tr>
<td>Domain:</td>
<td><code>Object</code></td>
</tr>
<tr>
<td>Range:</td>
<td><code>Boolean</code></td>
</tr>
<tr>
<td>Functional:</td>
<td><code>true</code></td>
</tr>
</tbody>
</table>
<aside class="example">
<p>An ActivityPub <code>Note</code> with the <code>sensitive</code> property set to true.</p>
<pre class="json">
{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://purl.archive.org/miscellany"
],
"id": "https://example.com/notes/1",
"type": "Note",
"attributedTo": "https://example.com/users/john",
"summary": "A sensitive note",
"content": "This note contains sensitive content.",
"sensitive": true
}
</pre>
</section>
</section>
<section id="conformance">
<p>
This is required for specifications that contain normative material.
</p>
</section>
</body>
</html>