OK, so I want to add ActivityPub to my wiki. I started the endeavour by looking at the blog post How to implement a basic ActivityPub server as it uses static files to get started.
How to implement a basic ActivityPub server
My goals:
1. be able to search for my account ✔
2. see all my blog posts on the profile page ✘
I’ve compared my responses to the responses from my Octodon Social account and can’t figure out what I’m doing wrong.
Let’s start at the beginning: We need WebFinger support. Compare the two:
curl https://octodon.social/.well-known/webfinger?resource=acct:kensanata@octodon.social curl https://alexschroeder.ch/.well-known/webfinger?resource=acct:alex@alexschroeder.ch
Looking good!
Use the self URL from the result above and the application/json MIME type (if you don’t, you’ll get HTML) to get the actor:
curl -H Accept:application/json https://octodon.social/users/kensanata curl -H Accept:application/json https://alexschroeder.ch/wiki?action=actor
Find the outbox in the result above and request it:
curl -H Accept:application/json https://octodon.social/users/kensanata/outbox curl -H Accept:application/json https://alexschroeder.ch/wiki?action=outbox
This is where the good times end. I can search for the profile of `@alex` in my Mastodon client, and I can click on the profile, and it lists the number of items in my outbox (4.9K) – but it doesn’t actually list the items themselves. In order to do this, the Mastodon server would have to follow the link to the “first” page of items and my webserver logs show that it does not. 😟
As far as I can tell the only different is that my outbox doesn’t list a “last” property.
This is what we would be getting:
curl -H Accept:application/json https://octodon.social/users/kensanata/outbox?page=true curl -H Accept:application/json "https://alexschroeder.ch/wiki?action=outbox&offset=0"
I’m not sure how to debug this, and since Mastodon aggressively caches responses, it’s also hard to retry things.
#Mastodon #Oddmuse