New ActivityPub support in Gruta
I have implemented partial ActivityPub support in pygruta, the Python port of my decades-old web CMS software Gruta. It has been implemented as two big blocks; the first one is a daemon process that, getting queries redirected from the web server,
- Answers to
webfingerGET method requests,
- Answers to ActivityPub actor (user) GET method requests,
- Accepts (and confirms) follow commands from POST method requests and registers the follower,
- Accepts un-following commands from POST method requests and de-registers the follower,
- Accepts messages (direct or public) from any ActivityPub user from POST method requests and stores them in a special topic as Gruta stories.
On the other hand, a command-line tool (triggered by
cron) does the following:
- Collects a story feed (the same set of stories that would be used in an ATOM or RSS feed) and sends it to all registered followers as public ActivityPub notes.
As of now, you cannot answer to a message sent from this network. I've yet to find a way of doing it, but most probably it would be by writing a standard story and using a special destination field or searching for a mention inside the story content matching the
@user@host standard way of mentioning.
It has been a very tedious work, as the documentation is poor and confusing and you never get helpful feedback from errors. I did the development against different software (Mastodon, Friendica and Pleroma), but only got it working for the first one (it's the most common out there, though).
You can follow my id
@firstname.lastname@example.org from this network.