Going to write a tutorial on building a "Hello World" service for the fediverse as soon as I can figure out how to federate with the fediverse.

This is exactly what I want to do: github.com/tootsuite/mastodon/ ...but things seemed to have changed in a year. So I'm looking at Peertube as well as Mastodon; have Webfinger support; getting ActivityStreams in there; I think I need Pubsubhubbub now? What the hell is "salmon" and this "magic key" that I apparently need?

Show thread

Okay some of that stuff is from OStatus and not needed for a pure application. Test accounts now show up in search; working on posts next.

Show thread

GETting an outbox works; correct number of posts shows up. Now I guess I need to keep track of followers on my end to know where to deliver events when a new post is published.

Show thread

Still working on sending the `Accept` activity back after receiving a `Follow` on @write_as. If I don't sign the request Mastodon rejects it.

I'm reading that there's no official authentication method in the spec, but that HTTP Signatures should be enough, but also that I might need Linked Data Signatures for things that'll get passed around (like posts). Will see.

I'm now looking at and Mastodon's code to figure out what data to send.

Show thread

Got HTTP Signatures in, but Mastodon is giving me this error:

OpenSSL::PKey::RSAError (Neither PUB key nor PRIV key: nested asn1 error)

Looking more into things, it doesn't seem the Go crypto libraries create keypairs that are compatible with OpenSSL, so switching to this one github.com/spacemonkeygo/opens for generating the keys.

Show thread

Tried that library, but everything broke when I had different versions of OpenSSL on my dev machine and server. Now just calling the CLI from the app.

Keys look good now, Mastodon is accepting my requests, but the Accept activity isn't having any effect. Going to start digging some more

Show thread

Accept activity still not having an effect, despite seeing a 202 response in the logs. So went ahead and started sending Create activities for new posts, and oddly I'm getting a 401 back for that. Think I've done enough for tonight

Show thread
Sign in to participate in the conversation
Writing Exchange

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!