Taking a break from the fishing game I was building while taking a break from #TuskPHP to see if I can build a tiny #MastodonBot in #Rust.
It is a bot which flips a coin.
I'm calling it #CoinFlipBot.
So far I can get a random coin flip result, and set a GET request. This might take a while.
#TuskPHP #mastodonbot #rust #coinflipbot
@beausimensen @Njames @ramsey @jaytaph @coulb I always try to mark my work on Tusk (working title only, will probably rename if I spend much more time on it) with the #TuskPHP hashtag, and the more general #ActivityPubDev hashtag.
Current status: Temporarily distracted from my #TuskPHP fiddling making an arcade style fishing game for my daughter for the holidays.
That's right, fishing. I thought it was pretty obvious from the video. Can't you see the fishing line and the fish?
@ShawnMcCool@fosstodon.org @ShawnMcCool@noc.social I've watched this talk twice and I'd like to spend some time working with this approach to see how it feels.
I'm going to try to incorporate this kind of approach in my #TuskPHP project and see how it goes.
#TuskPHP update:
Success! I was able to post a reply to an existing toot on a Mastodon instance.
#TuskPHP #php #laravel #activitypub #activitypubdev
Tonight's #TuskPHP increment:
Signing the request and adding the signature header:
https://github.com/AndrewFeeney/tusk/commit/a426c78d476d2d6beb496aef19332fdc0ca54695
Now to swap out the existing implementation.
#TuskPHP #php #laravel #activitypub #activitypubdev
Today's increment for #TuskPHP:
Finished a method to generate the signing string. Next will be to implement adding the signature header to the request.
Been a bit distracted this week with family life, and ChatGPT.
Crawling along, but getting there.
https://github.com/AndrewFeeney/tusk/commit/cff0ef2c3c0d715d0a4fe30fc897942c0fca2181
#TuskPHP #php #laravel #activitypub #activitypubdev
Another #TuskPHP thought. I'm thinking I'll try to build it without the assumption of a SQL database. It seems to me one of the scaling issues that the #mastodonadmin community is having is around the fact that the database has to be a single node, and can only be scaled vertically, which works fine but has limits and becomes expensive.
I'm thinking I would like to design it with compatibility with a database option that's designed to run as a cluster to allow for easier horizontal scaling.
Tonight's #TuskPHP increment:
Among other things, inroads into logic for determining the appropriate signing string for the request. This may be the origin of my problem with getting mastodon to verify the signature of my request when #federating.
https://github.com/AndrewFeeney/tusk/commit/5f7b474751eb683b72d40bb3b53c50963bb4ce97
#TuskPHP #federating #php #laravel #activitypub #activitypubdev
I’m thinking through directions for #TuskPHP in terms what makes sense for me to spend my spare time on.
As tempting as it feels to jump into front end stuff and start building my own Twitter clone, I feel like I need to avoid that urge. I know I *could* do that and it would be fun for a while, but in the end it’s a recipe for an abandoned project.
My opinions on a microblogging front end won’t please anyone but me, and I can’t build something as slick as what people are used to in spare time.
Tonight's #TuskPHP increment.
After much gnashing of teeth and some lessons on RSA padding schemes over the last few days, I get a simple test up and running for a basic signature service. I haven't actually swapped out the existing signature implementation yet but I'm hoping this will solve my signature woes.
I took my example values from this document https://datatracker.ietf.org/doc/html/draft-cavage-http-signatures-08#section-2.1.1 which was cited in the landrok/activitypub package codebase.
#TuskPHP #php #activitypub #activitypubdev #laravel
#TuskPHP update.
I've been spinning my wheels for a couple of days trying to post a reply to a toot on mastodon. I've ended up just getting 500 errors back from mastodon and I'm out of ideas of how to debug that without deploying my own instance. I've tried fiddling around with a local dev instance but it complains about self signed SSL.
Instead I'm going to take a step back and see what other parts of #ActivityPub I can implement in my experimental project.
#TuskPHP #activitypub #php #laravel #activitypubdev
Tonight's #TuskPHP contribution:
I think I've sorted the digest header issues, and I'm now getting 500 errors from Mastadon. I can see some errors in my logic, and resulting JSON so I've got some leads to follow, but once again it's time to get some sleep.
Slowly getting closer ...
#TuskPHP #php #laravel #activitypub #activitypubdev
Tonight's #TuskPHP contribution.
After deploying my work so far to a public server I found that I was missing the "Digest" header. Turns out that this is a requirement which has been added to Mastodon's ActivityPub implementation since the article I was reading had been written.
Some googling head me to a few online discussions, and finally to this example from the #Drupal community: https://git.drupalcode.org/project/activitypub/-/commit/0bdd562 which was helpful.
#TuskPHP #drupal #php #laravel #activitypub
Tonights #TuskPHP contribution:
Implementing a show post endpoint, some refactoring, and finally the command to send a reply to a post:
https://github.com/AndrewFeeney/tusk/commit/67b0c44f0022627cc9bd59e2b8b7926ab563ee31
_In theory_ if this was deployed to a domain secured with TLS it would be possible to use to reply to posts with this command.
I haven't tested it though because it's late and I've run out of time to deploy it somewhere. Maybe tomorrow ...
#TuskPHP #php #laravel #activitypub
Latest #TuskPHP contribution.
A little more refactoring, cleaning up some domain language confusion between usernames and handles.
https://github.com/AndrewFeeney/tusk/commit/c0d14606fc0032fce15c2c622116ba37f7ebb15c
I'm really skirting around the edges of actual "try sending a post" thing ... maybe tomorrow.
#TuskPHP #php #laravel #activitypub
Hey @andrewfeeney , I saw #TuskPHP is moving forward nicely. Have you started testing against a mastodon instance? I seem to be doing something wrong. When I search my user from Mastodon, it calls my server to retrieve the actor's JSON-LD on the link specified by webfinger, but there's something it does not like, although idk what.
In the #fediverse, does the term #handle refer to the fully qualified username and dome, e.g. andrewfeeney@php.social? Is the leading '@' considered part of the 'handle'?
#actionpub #TuskPHP #handle #fediverse
My latest #TuskPHP contribution:
I allowed myself the luxury of some refactoring. As often happens when I do that I think I might have taken things a bit far, and neglected to honour my previously stated intentions of not worrying about architecture yet.
I've decoupled things from the database a bit and refactoring the existing logic into domain objects. Not sure if the new namespace structure will stick.
https://github.com/AndrewFeeney/tusk/commit/98ded42920ed6a6483ca7f194c1734ff4e7bec6a
Next step, back to that command.
#activitypub #laravel #php #TuskPHP
Latest #TuskPHP increment:
I signed the request to send a reply to a Mastodon post and verified the signature in the test.
https://github.com/AndrewFeeney/tusk/commit/6d0add45403ceeb91be965db817f4ad633bb22ec
Next step will be to add a command to manually trigger a command, and then deploy it to a domain secured with TLS, and see if it actually works.
#activitypub #laravel #php #TuskPHP