I’ve build my new toy bovine with fediverse-pasture and it allows me to mess around with this kind of stuff.
To follow the instructions, get the fediverse-pasture and start mitra via
docker compose --file fediverse-pasture/mitra.yml up
Then from the compose file on the tutorial for bovine start the repl
docker compose run repl
If one runs the following commands:
>>> note = {
"@context": "https://www.w3.org/ns/activitystreams",
"id": "http://bovine/example.com",
"type": "Person",
"preferredUsername": "test",
"inbox": "https://example.com/inbox",
"content": "<p>I am so sorry.</p>",
"attributedTo": "http://bovine/milkdrinker",
"to": "http://mitra/users/admin",
}
>>> await actor.post("http://mitra/users/admin/inbox", activity_factory.create(note).build())
<ClientResponse(http://mitra/users/admin/inbox) [202 Accepted]>
<CIMultiDictProxy('Content-Length': '0', 'x-content-type-options': 'nosniff', 'content-security-policy': "base-uri 'self'; connect-src 'self'; default-src 'none'; frame-ancestors 'none'; img-src 'self' data:; manifest-src 'self'; media-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self'", 'Vary': 'Origin, Access-Control-Request-Method, Access-Control-Request-Headers', 'Date': 'Sun, 20 Oct 2024 07:39:29 GMT')>
One creates a valid Activity in mitra by @silverpill see:
This is a consequence of Mitra using duck typing to parse arriving objects (AFAIK). It couldn’t hand the "type": ["Note", "Person"].
I’m done playing with my toys now.
