wiki.trwnh.com/content/tech/spec/activitypub/ideas/orderedAttachment.md
2024-01-11 11:42:59 -06:00

1.1 KiB

+++ +++

https://github.com/w3c/activitystreams/issues/537

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

{
	"@context": [
		{
			"orderedAttachment": {
				"@id": "https://www.w3.org/ns/activitystreams#attachment",
				"@type": "@id",
				"@container": "@list"
			}
		},
		"https://www.w3.org/ns/activitystreams"
	]
}

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

{
  "@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