wiki.trwnh.com/content/tech/spec/activitypub/ideas/orderedAttachment.md

45 lines
1.1 KiB
Markdown
Raw Normal View History

2024-01-11 17:42:59 +00:00
+++
+++
<https://github.com/w3c/activitystreams/issues/537>
2023-05-08 16:31:37 +00:00
problem: sometimes you want to have attachments in a certain order, but `attachment` is an unordered set by default
solution: define `orderedAttachment` similar to `orderedItems`
```json
{
"@context": [
{
"orderedAttachment": {
2024-01-11 17:42:59 +00:00
"@id": "https://www.w3.org/ns/activitystreams#attachment",
2023-05-08 16:31:37 +00:00
"@type": "@id",
"@container": "@list"
}
},
"https://www.w3.org/ns/activitystreams"
]
}
```
2024-01-11 17:42:59 +00:00
you could maybe do the same for `orderedTag` but idk if that makes full sense bc `tag` is not really used for categorization so much... but if tumblr or a tumblr-like implementation wanted to order their tags then they have no way of doing so
if you don't do this, you can technically do this instead
```json
{
"@context": "https://www.w3.org/ns/activitystreams",
"id": "https://example.com/object",
"type": "Note",
"content": "hello world, see attached in order",
"attachment": {
"@list": [
"https://example.com/1",
"https://example.com/2",
"https://example.com/3"
]
}
}
```
this is basically just having the expanded jsonld left as-is