w3c / activitypub

http://w3c.github.io/activitypub/
Other
1.2k stars 77 forks source link

Actor that does not send activities #422

Open evanp opened 7 months ago

evanp commented 7 months ago

Interesting idea from the fediverse today: can you implement a static actor that is poll-only, and does not deliver activities to subscribers?

https://toot.cafe/@potch/111921390435586597

I think the answer is yes. You'd need an Actor profile with all the required collections, of course.

You couldn't build up a social graph because you don't send Follow activities and you don't respond to them with Accept/Reject.

It would be optional, I guess, whether you also disable any incoming reaction activities (likes, replies, shares). You could definitely maintain the collections with inbound HTTP handlers.

Honestly, I think this is a really nice "first step" for implementers. I might write up a page in the Primer about it.

evanp commented 7 months ago

I was able to set up an actor at https://evanp.github.io/actor.jsonld with static files hosted on GitHub Pages.

I added Webfinger support with a static file; evanp@evanp.github.io is discoverable via Webfinger in Mastodon.

I was happy to see that the user is discovered, but the single create activity in the outbox is not. Mastodon apparently doesn't pull the outbox collection when loading a remote actor.

I just finished the chapter on the ActivityPub federation protocol in my book for O'Reilly, and I hadn't really ordered the implementation in this kind of way, but I think this would be a good order to implement AP:

The first one only requires static hosting; the second requires dynamic processing -- like a serverless function or an API endpoint. The third requires (more or less) a queue and retry mechanisms. The fourth is similar to the second, but since you need to have delivery working first, probably needs to come after it.

I'll add a page at https://www.w3.org/wiki/ActivityPub/Primer/Actor_without_deliveries to show how this kind of actor can be set up.