<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/rss-style.xsl" type="text/xsl"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	     xmlns:dc="http://purl.org/dc/elements/1.1/"
	   xmlns:atom="http://www.w3.org/2005/Atom"
	     xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	  xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>ActivityBot &#8211; Terence Eden’s Blog</title>
	<atom:link href="https://shkspr.mobi/blog/tag/activitybot/feed/" rel="self" type="application/rss+xml" />
	<link>https://shkspr.mobi/blog</link>
	<description>Regular nonsense about tech and its effects 🙃</description>
	<lastBuildDate>Sat, 10 Oct 2026 12:01:12 +0000</lastBuildDate>
	<language>en-GB</language>
	<copyright>© Terence Eden. 🄯 CC BY-SA. See https://shkspr.mobi/blog/copyright-and-copyleft/</copyright>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.3</generator>

<image>
	<url>https://shkspr.mobi/blog/wp-content/uploads/2023/07/cropped-avatar-32x32.jpeg</url>
	<title>ActivityBot &#8211; Terence Eden’s Blog</title>
	<link>https://shkspr.mobi/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title><![CDATA[I paid people to try and follow my README]]></title>
		<link>https://shkspr.mobi/blog/2026/10/i-paid-people-to-try-and-follow-my-readme/</link>
					<comments>https://shkspr.mobi/blog/2026/10/i-paid-people-to-try-and-follow-my-readme/#comments</comments>
				<dc:creator><![CDATA[Terence Eden]]></dc:creator>
		<pubDate>Sun, 11 Oct 2026 11:34:39 +0000</pubDate>
		<category><![CDATA[ActivityBot]]></category><category><![CDATA[ActivityPub]]></category><category><![CDATA[developers]]></category>		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=76333</guid>

					<description><![CDATA[Developers suck at writing documentation. We like to say RTFM but often there ain&#039;t no FM to R. At best we have a half-arsed collection of notes, some obsolete tips, and a link to a desolate forum full of people asking the same questions again and again. That&#039;s no way to treat our users.  I naïvely believe there&#039;s a better way. As I&#039;ve written before, you should sit down and actually test your …]]></description>
										<content:encoded>&lt;p&gt;Developers suck at writing documentation. We like to say RTFM but often there ain't no FM to R. At best we have a half-arsed collection of notes, some obsolete tips, and a link to a desolate forum full of people asking the same questions again and again. That's no way to treat our users.&lt;/p&gt;

&lt;p&gt;I naïvely believe there's a better way. As I've written before, you should sit down and &lt;a href="https://shkspr.mobi/blog/2025/10/how-to-actually-test-your-readme/"&gt;&lt;em&gt;actually&lt;/em&gt; test your readme&lt;/a&gt;. Spin up a fresh Virtual Machine, go through what you've written, and see if it makes sense.&lt;/p&gt;

&lt;p&gt;But it is &lt;em&gt;really&lt;/em&gt; hard to ignore your own biases. Of course you know that certain commands require &lt;code&gt;sudo&lt;/code&gt; and obviously when you wrote &lt;code&gt;-foo&lt;/code&gt; you meant &lt;code&gt;--foo&lt;/code&gt; and everyone knows that you have to reboot afterwards.&lt;/p&gt;

&lt;p&gt;How do you get rid of those biases? I paid people!&lt;/p&gt;

&lt;p&gt;As part of my &lt;a href="https://shkspr.mobi/blog/2026/08/activitybot-is-the-recipient-of-an-nlnet-grant/"&gt;NLnet grant application for ActivityBot&lt;/a&gt;, I said I wanted to test the install experience with real users and I was prepared to pay them €25 for an hour of their time. I stuck out the call on Mastodon, gathered a few people, and had a video call with them.&lt;/p&gt;

&lt;p&gt;The format was simple. I explained that I was looking for feedback on the first-run experience. I knew that it wasn't perfect and actively wanted constructive criticism. I asked the volunteer to share their screen and, crucially, to speak aloud. Tell me what they were doing. What they didn't understand, what confused them, what delighted them, what frustrated them, etc.&lt;/p&gt;

&lt;p&gt;I took notes by hand (fuck feeding the machine) and spent several hours being told what incorrect assumptions I'd made.&lt;/p&gt;

&lt;p&gt;Amongst the highlights I discovered were:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The link to the demo tool was wrong.&lt;/li&gt;
&lt;li&gt;Some people read a README in the terminal.&lt;/li&gt;
&lt;li&gt;What does it actually mean to rename a file?&lt;/li&gt;
&lt;li&gt;How do you rename a hidden file?&lt;/li&gt;
&lt;li&gt;Should a demo tool be available on the web or just the user's local machine?&lt;/li&gt;
&lt;li&gt;Why does some text explicitly need to be quoted and some not?&lt;/li&gt;
&lt;li&gt;My jokes aren't funny and are actively confusing.&lt;/li&gt;
&lt;li&gt;Some of the technical terminology needed explaining.&lt;/li&gt;
&lt;li&gt;The ordering of the different sections was confusing.&lt;/li&gt;
&lt;li&gt;I hadn't actually explained what the software would do.&lt;/li&gt;
&lt;li&gt;A whole section which was technically interesting to me was utterly confusing to everyone else.&lt;/li&gt;
&lt;li&gt;Not all web servers use permissions in the same way.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And on it went!&lt;/p&gt;

&lt;p&gt;After each session I updated the README based on what people found difficult, then I re-tested it with the next person.&lt;/p&gt;

&lt;p&gt;In total, I paid out around €150 to have a bunch of people criticise me to my face. Hey, cheaper than therapy, right?&lt;/p&gt;

&lt;p&gt;I know someone is going to say "why not just ask an LLM to simulate a range of users?" The answer is very simple - I want to speak to real people. People are brilliant! They can make you laugh, you can see their cat when it wanders on to the call, they bring a unique perspective to the problem, and they're really happy when you give them a €25 voucher. Some will gladly do it for free and make &lt;em&gt;you&lt;/em&gt; happy!&lt;/p&gt;

&lt;!--👋👋👋👋👋👋👋 Welcome to Comment Club! Shhhh! Only cool people can read this bit of the post.

I did have a serious think about using an LLM for this. Ethics aside (and you can never really put ethics aside) I just didn't feel like I could trust their judgement. I get the argument that it is not much different from using a spellcheck - but I fundamentally don't want to feed the beast.

Anyway, the three rules of Comment Club are…

1. You must not tell anyone about Comment Club - let them find out about it themselves.
2. You *must* add some Comment Club Content to at least one of your blog posts. Doesn't have to be much, just a little note will do.
3. You should drop an email to anyone whose comments you've read. Start by sending me a friendly message at comment.club@shkspr.mobi

Keep your eyes peeled for more comments in future blog posts 😃

Be seeing you 👌👁
--&gt;

&lt;p&gt;When I was doing technical writing for GOV.UK, all my beautiful prose was given a second-eye by another human. They eviscerated all my flowery phrases and turned the document into something more readable. They were the ones who caught the mistakes that no spell chequer could. They were able to have a proper conversation with me. More importantly, I could &lt;em&gt;hear&lt;/em&gt; the frustration in their voice - that's the thing which lets you know a mistake needs to be corrected.&lt;/p&gt;

&lt;p&gt;I don't claim that &lt;a href="https://gitlab.com/edent/activity-bot/-/blob/main/README.md?ref_type=heads"&gt;ActivityBot's README&lt;/a&gt; is now perfect - far from it - but it is now demonstrably easier to follow. Developers need to talk to &lt;em&gt;real&lt;/em&gt; people. You don't have to pay them if you can't afford it - but find a few people who will talk aloud while they try to follow your instructions. I guarantee you that your README will become much better for it.&lt;/p&gt;
&lt;img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=76333&amp;amp;HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager"&gt;</content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2026/10/i-paid-people-to-try-and-follow-my-readme/feed/</wfw:commentRss>
			<slash:comments>12</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Some quick thoughts on Unit Testing ActivityPub]]></title>
		<link>https://shkspr.mobi/blog/2026/10/some-thoughts-on-unit-testing-activitypub/</link>
					<comments>https://shkspr.mobi/blog/2026/10/some-thoughts-on-unit-testing-activitypub/#comments</comments>
				<dc:creator><![CDATA[Terence Eden]]></dc:creator>
		<pubDate>Sat, 10 Oct 2026 11:34:15 +0000</pubDate>
		<category><![CDATA[ActivityBot]]></category><category><![CDATA[ActivityPub]]></category><category><![CDATA[PHP]]></category>		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=75774</guid>

					<description><![CDATA[I&#039;ll be radically honest here - I never really got the idea of &#34;Test Driven Development&#34;. I&#039;m much more of a &#34;telnet into production and damn the consequences&#34; kind of guy. Look, it&#039;s much more fun and my cardiologist recommends severe shocks every now and again.  The essence of unit testing is pretty simple:   Feed a function some data See how it responds   Send it good data and if it returns…]]></description>
										<content:encoded>&lt;p&gt;I'll be radically honest here - I never really got the idea of "Test Driven Development". I'm much more of a "telnet into production and damn the consequences" kind of guy. Look, it's much more fun and my cardiologist recommends severe shocks every now and again.&lt;/p&gt;

&lt;p&gt;The essence of unit testing is pretty simple:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Feed a function some data&lt;/li&gt;
&lt;li&gt;See how it responds&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Send it good data and if it returns "true" the test passes. Send it bad data and make sure it returns false. Easy peasy lemon squeezy.&lt;/p&gt;

&lt;p&gt;As part of my &lt;a href="https://shkspr.mobi/blog/2026/08/activitybot-is-the-recipient-of-an-nlnet-grant/"&gt;NLnet funded work on ActivityBot&lt;/a&gt;, I'm writing some proper tests for my bot framework. I am hopeful that some of them will be useful to other projects doing similar things.&lt;/p&gt;

&lt;p&gt;There are four major classes of tests - here are the problems I've found while writing them.&lt;/p&gt;

&lt;h2 id="basic-text-validation"&gt;&lt;a href="https://shkspr.mobi/blog/2026/10/some-thoughts-on-unit-testing-activitypub/#basic-text-validation"&gt;Basic text validation&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;A basic test might be how to validate that an ActivityPub username is valid. Typically it would be something like &lt;code&gt;@edent@mastodon.social&lt;/code&gt; - what assumptions do we make with that? It starts with an &lt;code&gt;@&lt;/code&gt; and has another &lt;code&gt;@&lt;/code&gt; somewhere in it, dividing into two parts, the user and the server.  The server has to be a valid domain name - but that can include non-ASCII Internationalised Domain Names and Emoji domains.&lt;/p&gt;

&lt;p&gt;What about the user part? Is it just A-Z and 0-9? Can it have dots? What about apostrophes like an email address?&lt;/p&gt;

&lt;p&gt;Basically, how easy is it find the specifications for all the various component parts of ActivityPub? Not very!&lt;/p&gt;

&lt;h2 id="message-validation"&gt;&lt;a href="https://shkspr.mobi/blog/2026/10/some-thoughts-on-unit-testing-activitypub/#message-validation"&gt;Message validation&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;What does a &lt;a href="https://www.rfc-editor.org/info/rfc7033/"&gt;WebFinger response&lt;/a&gt; look like? Which parts are mandatory and what values can they contain?&lt;/p&gt;

&lt;p&gt;With any message that your project generates, how can you be sure that other ActivityPub servers will understand it?&lt;/p&gt;

&lt;p&gt;Similarly, when we receive a follow message from an external server, what should it look like?&lt;/p&gt;

&lt;p&gt;There are some &lt;a href="https://github.com/steve-bate/fediverse-jsonschema"&gt;JSON Schemas&lt;/a&gt; which can be used to validate some type of messages.&lt;/p&gt;

&lt;p&gt;But, again, there are &lt;em&gt;many&lt;/em&gt; scattered specifications.&lt;/p&gt;

&lt;h2 id="signature-verification"&gt;&lt;a href="https://shkspr.mobi/blog/2026/10/some-thoughts-on-unit-testing-activitypub/#signature-verification"&gt;Signature verification&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;As I've written about before, &lt;a href="https://shkspr.mobi/blog/2026/09/a-reasonably-practical-guide-to-validating-rfc-9421-http-signatures-for-activitypub-in-php/"&gt;HTTP Signatures are difficult&lt;/a&gt;. There are two main problems. The first is verifying signatures.&lt;/p&gt;

&lt;p&gt;In order to do that, you need to gather a bunch of signatures and then find a way to replay them into the test. So I'm in the process of saving signatures which I can then share with others.&lt;/p&gt;

&lt;p&gt;The second problem is &lt;em&gt;generating&lt;/em&gt; signatures.  Sure, you can run tests on the signatures - but there's only one &lt;em&gt;real&lt;/em&gt; way to test whether they're acceptable…&lt;/p&gt;

&lt;h2 id="communicating-with-others"&gt;&lt;a href="https://shkspr.mobi/blog/2026/10/some-thoughts-on-unit-testing-activitypub/#communicating-with-others"&gt;Communicating with others&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Passing tests means nothing if you can't communicate with others and they can't communicate with you.&lt;/p&gt;

&lt;p&gt;Some tests are easier than others. Sending a signed request should be easy and repeatable. But receiving messages isn't easily automated. It requires being able to control an external server and asking that to send messages.&lt;/p&gt;

&lt;p&gt;With the &lt;a href="https://docs.joinmastodon.org/client/intro/"&gt;Mastodon API&lt;/a&gt; it is possible to make requests which will interact with your server - but only if it is a &lt;em&gt;public&lt;/em&gt; server.&lt;/p&gt;

&lt;h2 id="putting-it-all-together"&gt;&lt;a href="https://shkspr.mobi/blog/2026/10/some-thoughts-on-unit-testing-activitypub/#putting-it-all-together"&gt;Putting it all together&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;I'm putting &lt;a href="https://gitlab.com/edent/activity-bot/-/tree/main/tests?ref_type=heads"&gt;all my tests online&lt;/a&gt;. I'm also sharing a &lt;a href="https://gitlab.com/edent/activity-bot/-/tree/main/tests/headers?ref_type=heads"&gt;collection of messages and signatures&lt;/a&gt; which you can use in your tests.&lt;/p&gt;

&lt;p&gt;I'd love to know if you find them useful.&lt;/p&gt;
&lt;img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=75774&amp;amp;HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager"&gt;</content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2026/10/some-thoughts-on-unit-testing-activitypub/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[ActivityPub - How to send an updated user profile to Mastodon and the Fediverse]]></title>
		<link>https://shkspr.mobi/blog/2026/09/activitypub-how-to-send-an-updated-user-profile-to-mastodon-and-the-fediverse/</link>
					<comments>https://shkspr.mobi/blog/2026/09/activitypub-how-to-send-an-updated-user-profile-to-mastodon-and-the-fediverse/#respond</comments>
				<dc:creator><![CDATA[Terence Eden]]></dc:creator>
		<pubDate>Sat, 12 Sep 2026 11:34:02 +0000</pubDate>
		<category><![CDATA[ActivityBot]]></category><category><![CDATA[ActivityPub]]></category><category><![CDATA[fediverse]]></category><category><![CDATA[mastodon]]></category>		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=74470</guid>

					<description><![CDATA[Let&#039;s suppose you&#039;ve updated the description of your ActivityPub account from &#34;World&#039;s Number 1 Taylor Swift Fan&#34; to &#34;This account is now a Nickleback Truther&#34;. How do you let the rest of the Fediverse know that you&#039;ve changed your allegiance?  By default, most Mastodon instances won&#039;t periodically poll your account information just to see if you&#039;ve updated it. So how does the information get…]]></description>
										<content:encoded>&lt;p&gt;Let's suppose you've updated the description of your ActivityPub account from "World's Number 1 Taylor Swift Fan" to "This account is now a Nickleback Truther". How do you let the rest of the Fediverse know that you've changed your allegiance?&lt;/p&gt;

&lt;p&gt;By default, most Mastodon instances won't periodically poll your account information just to see if you've updated it. So how does the information get from your server to your followers' servers?&lt;/p&gt;

&lt;p&gt;This wasn't immediately obvious to me, but I got a clue from reading &lt;a href="https://shkspr.mobi/blog/2026/09/book-review-activitypub-by-evan-prodromou/"&gt;Evan Prodromou's book on ActivityPub&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;The Update activity type is for updating the properties of an object represented by the object property.&lt;/p&gt;

&lt;p&gt;The most common types of objects that can be updated are content objects, like Note or Image. Actor types (like Person) and Question activity types can also be updated.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Aha!&lt;/p&gt;

&lt;p&gt;You need to craft an &lt;code&gt;Update&lt;/code&gt; message which has as its object the &lt;em&gt;new&lt;/em&gt; user information. That needs to be sent to the inbox of all your followers.&lt;/p&gt;

&lt;p&gt;Something like this:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-json"&gt;{
    "@context": "https://www.w3.org/ns/activitystreams",
    "actor": "https://example.com/user",
    "id": "6a9162a6-a8e5-ca0f-9c08-8e6b814acef8",
    "published": "2026-08-31T12:34:56+01:00",
    "to": "https://www.w3.org/ns/activitystreams#Public",
    "type": "Update",
    "object": {
        "@context": [
            "https://www.w3.org/ns/activitystreams",
            "https://w3id.org/security/v1"
        ],
        "id": "https://example.com/user",
        "name": "My new name",
        "summary": "A brand new description!",
        …
    },
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Obviously the &lt;em&gt;full&lt;/em&gt; user information is a bit more than that - it will include inbox details, public keys, avatars, etc. The &lt;code&gt;published&lt;/code&gt; property in the Update activity should be when you changed your details - not when the account was created.&lt;/p&gt;

&lt;p&gt;Once that was sent, Mastodon immediately reflected the changes.&lt;/p&gt;

&lt;h2 id="thanks-to-nlnet"&gt;&lt;a href="https://shkspr.mobi/blog/2026/09/activitypub-how-to-send-an-updated-user-profile-to-mastodon-and-the-fediverse/#thanks-to-nlnet"&gt;Thanks to NLnet&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;This blog post was funded in part by the work I'm doing for my NLnet NGI0 grant to develop &lt;a href="https://gitlab.com/edent/activity-bot"&gt;ActivityBot&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://nlnet.nl/project/ActivityBot/"&gt;&lt;img src="https://shkspr.mobi/blog/wp-content/uploads/2026/08/NGI-logos.webp" alt="NLnet logo." width="900" height="200" class="aligncenter"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=74470&amp;amp;HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager"&gt;</content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2026/09/activitypub-how-to-send-an-updated-user-profile-to-mastodon-and-the-fediverse/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[ActivityPub - Is it worth defending against replay attacks and message/signature time skew?]]></title>
		<link>https://shkspr.mobi/blog/2026/09/activitypub-is-it-worth-defending-against-replay-attacks-and-message-signature-time-skew/</link>
					<comments>https://shkspr.mobi/blog/2026/09/activitypub-is-it-worth-defending-against-replay-attacks-and-message-signature-time-skew/#comments</comments>
				<dc:creator><![CDATA[Terence Eden]]></dc:creator>
		<pubDate>Tue, 08 Sep 2026 11:34:51 +0000</pubDate>
		<category><![CDATA[ActivityBot]]></category><category><![CDATA[ActivityPub]]></category><category><![CDATA[HTTP]]></category><category><![CDATA[security]]></category>		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=74622</guid>

					<description><![CDATA[Here&#039;s a problem that I&#039;ve found with ActivityBot - my little ActivityPub server. Sometimes it receives messages which were originally sent months ago. Why does that happen and is it risky to accept and process them?  My tl;dr is that it probably isn&#039;t worth worrying about. But I&#039;d love someone to tell me why I&#039;m wrong.  Here&#039;s my thinking:  Table of ContentsCausesIs that a problem?What are we…]]></description>
										<content:encoded>&lt;p&gt;Here's a problem that I've found with &lt;a href="https://gitlab.com/edent/activity-bot/"&gt;ActivityBot&lt;/a&gt; - my little ActivityPub server. Sometimes it receives messages which were originally sent &lt;em&gt;months&lt;/em&gt; ago. Why does that happen and is it risky to accept and process them?&lt;/p&gt;

&lt;p&gt;My tl;dr is that it &lt;em&gt;probably&lt;/em&gt; isn't worth worrying about. But I'd love someone to tell me why I'm wrong.&lt;/p&gt;

&lt;p&gt;Here's my thinking:&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;&lt;nav role="doc-toc"&gt;&lt;menu&gt;&lt;li&gt;&lt;h2 id="table-of-contents"&gt;&lt;a href="https://shkspr.mobi/blog/2026/09/activitypub-is-it-worth-defending-against-replay-attacks-and-message-signature-time-skew/#table-of-contents"&gt;Table of Contents&lt;/a&gt;&lt;/h2&gt;&lt;menu&gt;&lt;li&gt;&lt;a href="https://shkspr.mobi/blog/2026/09/activitypub-is-it-worth-defending-against-replay-attacks-and-message-signature-time-skew/#causes"&gt;Causes&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://shkspr.mobi/blog/2026/09/activitypub-is-it-worth-defending-against-replay-attacks-and-message-signature-time-skew/#is-that-a-problem"&gt;Is that a problem?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://shkspr.mobi/blog/2026/09/activitypub-is-it-worth-defending-against-replay-attacks-and-message-signature-time-skew/#what-are-we-trying-to-protect-against"&gt;What are we trying to protect against?&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://shkspr.mobi/blog/2026/09/activitypub-is-it-worth-defending-against-replay-attacks-and-message-signature-time-skew/#putting-it-all-together"&gt;Putting it all together&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://shkspr.mobi/blog/2026/09/activitypub-is-it-worth-defending-against-replay-attacks-and-message-signature-time-skew/#no-youre-wrong-and-i-can-prove-it"&gt;No! You're wrong and I can prove it!&lt;/a&gt;&lt;/li&gt;&lt;/menu&gt;&lt;/li&gt;&lt;/menu&gt;&lt;/nav&gt;&lt;p&gt;&lt;/p&gt;

&lt;h2 id="causes"&gt;&lt;a href="https://shkspr.mobi/blog/2026/09/activitypub-is-it-worth-defending-against-replay-attacks-and-message-signature-time-skew/#causes"&gt;Causes&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;All ActivityPub messages should have a "published" timestamp in their body. Some will have an "updated" timestamp. That tells you, unsurprisingly, when the message is alleged to have been originally published or updated. That time might be very different to the time you receive the message.&lt;/p&gt;

&lt;p&gt;There are, I think, three different reasons why a server might receive a message which has an out-of-date timestamp.&lt;/p&gt;

&lt;p&gt;The first is that sometimes servers are just slow. Processing thousands of messages at the same time means that some of those messages take a while to send.  &lt;a href="https://shkspr.mobi/blog/2023/09/how-far-did-my-post-go-on-the-fediverse/"&gt;ActivityPub is one big chain-mail&lt;/a&gt; so it can take several minutes for a message to be sent to all your followers.&lt;/p&gt;

&lt;p&gt;Similarly, your server might be slow. If it doesn't acknowledge receipt of a message, the original server will try sending it again. Sometimes that can take a while.&lt;/p&gt;

&lt;p&gt;Finally, some servers take a relaxed view of standards. They send an update to an old message but keep the original publication date. Ideally, they'd use an "updated" timestamp but quite often they don't.&lt;/p&gt;

&lt;p&gt;For the purposes of checking the legitimacy of the message, &lt;strong&gt;you do not need to check when a message says it was published or updated&lt;/strong&gt;. You might want to check it isn't an &lt;em&gt;obviously&lt;/em&gt; bogus date like far in the future or impossibly far in the past - but that's up to you.&lt;/p&gt;

&lt;p&gt;It is normal that your server receives messages which appear to have been published at a totally different time from now.&lt;/p&gt;

&lt;h2 id="is-that-a-problem"&gt;&lt;a href="https://shkspr.mobi/blog/2026/09/activitypub-is-it-worth-defending-against-replay-attacks-and-message-signature-time-skew/#is-that-a-problem"&gt;Is that a problem?&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Probably&lt;/em&gt; not.&lt;/p&gt;

&lt;p&gt;As described above, there are various reasons why a message may be delayed in transit - or may appear to come from the distant past.&lt;/p&gt;

&lt;p&gt;What we &lt;em&gt;can&lt;/em&gt; check is when the message was cryptographically signed by the sending server. This is independent of its published or updated timestamp.&lt;/p&gt;

&lt;p&gt;HTTP requests to your server will have a &lt;code&gt;date&lt;/code&gt; header which looks like &lt;code&gt;Tue, 01 Sep 2026 15:54:21 GMT&lt;/code&gt; - this is in the slightly peculiar and Anglocentric &lt;a href="https://www.rfc-editor.org/info/rfc5322/#section-3.3"&gt;RFC 5322 format&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;New style RFC 9421 headers will also have a &lt;code&gt;signature-input&lt;/code&gt; header which will contain something like &lt;code&gt;created=1788278061&lt;/code&gt;. That uses the slightly obscure &lt;a href="https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_16"&gt;UNIX / POSIX time&lt;/a&gt; which counts seconds since the "Epoch" of 1st January 1970.&lt;/p&gt;

&lt;p&gt;If you &lt;a href="https://www.epochconverter.com/"&gt;convert the UNIX time&lt;/a&gt; to something more modern, you should get an &lt;em&gt;identical&lt;/em&gt; value to the &lt;code&gt;date&lt;/code&gt; header.&lt;/p&gt;

&lt;p&gt;But that isn't always the case. For example, &lt;a href="https://www.rfc-editor.org/rfc/rfc9421.html#:~:text=Tue%2C%2020%20Apr%202021%2002%3A07%3A55%20GMT,-Content%2DType"&gt;the RFC 9421 standard gives this example&lt;/a&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-_"&gt;Date: Tue, 20 Apr 2021 02:07:55 GMT
"@signature-params": ("@method" "@authority" "@path" \
  "content-digest" "content-length" "content-type")\
  ;created=1618884473;keyid="test-key-rsa-pss"
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Converting &lt;code&gt;1618884473&lt;/code&gt; to normal time gives Tue, 20 Apr 2021 02:07:&lt;strong&gt;53&lt;/strong&gt; - a two second difference.&lt;/p&gt;

&lt;p&gt;If the &lt;code&gt;date&lt;/code&gt; and &lt;code&gt;created&lt;/code&gt; values differ significantly - that may indicate that the message is untrustworthy. Or that there was a delay between the signing and the sending.&lt;/p&gt;

&lt;p&gt;The spec says:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;The Date header field value represents the timestamp of the HTTP message. However, the creation time of the signature itself is encoded in the created signature parameter. These two values can be different, depending on how the signature and the HTTP message are created and serialized. Applications processing signatures for valid time windows should use the created signature parameter for such calculations. An application could also put limits on how much skew there is between the Date field and the created signature parameter, in order to limit the application of a generated signature to different HTTP messages.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.rfc-editor.org/rfc/rfc9421.html#section-7.2.4"&gt;7.2.4. Choosing Signature Parameters and Derived Components over HTTP Fields&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;But, of course, it doesn't tell you how much skew is problematic. It's up to you how much skew you're prepared to accept.&lt;/p&gt;

&lt;p&gt;So that's the difference between the sent time and the signed time. The next time to check is your own. As we've discussed, sometimes servers are slow sending things out. Would you accept a request that was signed five minutes ago? Five days ago? Five months ago? What amount of difference is dangerous?&lt;/p&gt;

&lt;p&gt;Here's what various services and sages have to say:&lt;/p&gt;

&lt;h3 id="mastodon"&gt;&lt;a href="https://shkspr.mobi/blog/2026/09/activitypub-is-it-worth-defending-against-replay-attacks-and-message-signature-time-skew/#mastodon"&gt;Mastodon&lt;/a&gt;&lt;/h3&gt;

&lt;blockquote&gt;&lt;p&gt;The request contains a Date header. Compare it with current date and time within a reasonable time window to prevent replay attacks.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://blog.joinmastodon.org/2018/07/how-to-make-friends-and-verify-requests/"&gt;How to make friends and verify requests&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;What is "reasonable"? The &lt;a href="https://github.com/mastodon/mastodon/blob/89bc0eb42609463d4b11e1604dacc37332a0f5ab/app/lib/signed_request.rb#L5"&gt;source code&lt;/a&gt; suggests one hour.&lt;/p&gt;

&lt;h3 id="grishka"&gt;&lt;a href="https://shkspr.mobi/blog/2026/09/activitypub-is-it-worth-defending-against-replay-attacks-and-message-signature-time-skew/#grishka"&gt;Grishka&lt;/a&gt;&lt;/h3&gt;

&lt;blockquote&gt;&lt;p&gt;Time in the Date header must differ from the recipient server’s clock by no more than 30 seconds&lt;/p&gt;

&lt;p&gt;&lt;a href="https://grishka.me/blog/activitypub-from-scratch/"&gt;A bare-minimum ActivityPub server from scratch&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;

&lt;h3 id="evan-prodromou"&gt;&lt;a href="https://shkspr.mobi/blog/2026/09/activitypub-is-it-worth-defending-against-replay-attacks-and-message-signature-time-skew/#evan-prodromou"&gt;Evan Prodromou&lt;/a&gt;&lt;/h3&gt;

&lt;blockquote&gt;&lt;p&gt;&lt;code&gt;static #maxDateDiff = 5 * 60 * 1000 // 5 minutes&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/evanp/activitypub-bot/blob/main/lib%2Fhttpsignatureauthenticator.js#L8"&gt;activitypub-bot&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;

&lt;h3 id="swicg"&gt;&lt;a href="https://shkspr.mobi/blog/2026/09/activitypub-is-it-worth-defending-against-replay-attacks-and-message-signature-time-skew/#swicg"&gt;SWICG&lt;/a&gt;&lt;/h3&gt;

&lt;blockquote&gt;&lt;p&gt;The standards don't give a concrete time window to use for this comparison. In practice, an hour plus a few minutes buffer in either direction may be a good value, to account for both clock skew and differences in time zone/daylight savings time configuration across systems.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://swicg.github.io/activitypub-http-signature/#how-to-verify-a-signature"&gt;How To Verify a Signature&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;

&lt;h3 id="others"&gt;&lt;a href="https://shkspr.mobi/blog/2026/09/activitypub-is-it-worth-defending-against-replay-attacks-and-message-signature-time-skew/#others"&gt;Others&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;Without naming names, it looks like a bunch of popular servers don't check whether there's a significant difference between the date the request was signed and the date it was received.&lt;/p&gt;

&lt;h3 id="summary"&gt;&lt;a href="https://shkspr.mobi/blog/2026/09/activitypub-is-it-worth-defending-against-replay-attacks-and-message-signature-time-skew/#summary"&gt;Summary&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;Various documents and implementations recommend anything between 30 seconds to "a bit more than 60 minutes". Or they just ignore any date difference.&lt;/p&gt;

&lt;p&gt;What's the right answer? What happens if the signed date is significantly different from the current date?&lt;/p&gt;

&lt;h2 id="what-are-we-trying-to-protect-against"&gt;&lt;a href="https://shkspr.mobi/blog/2026/09/activitypub-is-it-worth-defending-against-replay-attacks-and-message-signature-time-skew/#what-are-we-trying-to-protect-against"&gt;What are we trying to protect against?&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Replay Attacks. Suppose someone is listening to the communications between the sending server and your server. They copy the message that is sent to you. Later they send it again!&lt;/p&gt;

&lt;p&gt;At this point, you might be thinking "so what?" and… I'm inclined to agree with you!&lt;/p&gt;

&lt;p&gt;What's the worst that could happen if you received the same message multiple times? Two things that I can think of.&lt;/p&gt;

&lt;p&gt;Firstly, it might &lt;em&gt;not&lt;/em&gt; be the same message. It is possible to send a new message but with old headers. An attacker could make someone post "I hate Taylor Swift" against their will and watch as legions of fans disembowel the victim.&lt;/p&gt;

&lt;p&gt;Except, I don't think this is likely. The signature in the header contains a hash of the message being sent. If you are properly validating the signature, a changed message will have a different hash from the one in the original message. You don't need to check timestamps, you just need to check if the hashes match.&lt;/p&gt;

&lt;p&gt;Secondly, &lt;a href="https://www.freecodecamp.org/news/idempotence-explained"&gt;idempotence&lt;/a&gt;. That's a fancy word for "pressing the button multiple times should only result in one action".&lt;/p&gt;

&lt;p&gt;What happens if a user appears to send you multiple "like" messages for a single post? You only record one like.&lt;/p&gt;

&lt;p&gt;What if they send multiple messages with the same content? Well, each will have a unique ID in the message - so you only post it once.&lt;/p&gt;

&lt;p&gt;What if they send multiple &lt;em&gt;anythings&lt;/em&gt;? I can't think of any ActivityPub action which would not be idempotent.&lt;/p&gt;

&lt;p&gt;About the worst thing I can think of is this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Alice sends a message to you saying "I want to follow Bob".&lt;/li&gt;
&lt;li&gt;Mallory intercepts this message.&lt;/li&gt;
&lt;li&gt;You record Alice is now following Bob.&lt;/li&gt;
&lt;li&gt;Alice sends a message to you saying "I want to &lt;em&gt;unfollow&lt;/em&gt; Bob".&lt;/li&gt;
&lt;li&gt;You record the severed relationship.&lt;/li&gt;
&lt;li&gt;Mallory replays the original follow message.&lt;/li&gt;
&lt;li&gt;You record Alice is now following Bob.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's also possible the following could happen:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Alice posts a message saying "I love The Beatles".&lt;/li&gt;
&lt;li&gt;You record Alice's message and display it on the timeline.&lt;/li&gt;
&lt;li&gt;Alice updates her post to say "I love the Rolling Stones".&lt;/li&gt;
&lt;li&gt;Mallory intercepts this message.&lt;/li&gt;
&lt;li&gt;You record Alice's updated message and display the new version on the timeline.&lt;/li&gt;
&lt;li&gt;Alice updates her post yet again to say "I love the Spice Girls".&lt;/li&gt;
&lt;li&gt;You record Alice's updated message and display the new version on the timeline.&lt;/li&gt;
&lt;li&gt;Mallory replays the original update message.&lt;/li&gt;
&lt;li&gt;You now display that Alice loves the Stones rather than Spice Girls.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Perhaps the same can happen with like/unlike, block/unblock, boost/unboost.&lt;/p&gt;

&lt;p&gt;But none of that is significantly prevented by checking the date.&lt;/p&gt;

&lt;p&gt;Ultimately, it is up to your sever to check the unique ID of each message and refuse to action any repeated messages. You may not want to trust the unique ID which is sent with the message. If that's the case, you can calculate your own - perhaps using a hash of the contents, the signature, or some other process which will generate an ID based on the message.&lt;/p&gt;

&lt;h2 id="putting-it-all-together"&gt;&lt;a href="https://shkspr.mobi/blog/2026/09/activitypub-is-it-worth-defending-against-replay-attacks-and-message-signature-time-skew/#putting-it-all-together"&gt;Putting it all together&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Here's what you need to do to prevent replay attacks:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Independently calculate the hash of the message received.&lt;/li&gt;
&lt;li&gt;Validate that your calculated hash matches the hash sent in the message's HTTP headers.

&lt;ul&gt;
&lt;li&gt;If not, this is a potential replay attack and the message must be ignored.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Verify that the signature received in the message's HTTP headers includes the message hash and is cryptographically valid.

&lt;ul&gt;
&lt;li&gt;If not, the signature is invalid  and the message must be ignored.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Has the received message's unique ID already been processed?

&lt;ul&gt;
&lt;li&gt;If so, refuse to process it again.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I don't see what checking the timestamp of the HTTP signature has to do with anything. Someone who has access to the original messages and their headers could send them milliseconds after the original delivery.&lt;/p&gt;

&lt;p&gt;I think it is probably &lt;em&gt;pragmatic&lt;/em&gt; to give messages 60ish minutes grace before dropping them. Delays happen, but anything more significant than an hour &lt;em&gt;might&lt;/em&gt; indicate a attack. But, equally, might just mean that the Internet is having a slow day.&lt;/p&gt;

&lt;p&gt;If you are correctly checking signatures and hashes, I don't think you need to worry about skew between signature date and delivery date.&lt;/p&gt;

&lt;h2 id="no-youre-wrong-and-i-can-prove-it"&gt;&lt;a href="https://shkspr.mobi/blog/2026/09/activitypub-is-it-worth-defending-against-replay-attacks-and-message-signature-time-skew/#no-youre-wrong-and-i-can-prove-it"&gt;No! You're wrong and I can prove it!&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Please tell me where I have erred! Stick a comment in the box or drop me an email. If I've made a massive or subtle mistake, I'd love to know what.&lt;/p&gt;
&lt;img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=74622&amp;amp;HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager"&gt;</content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2026/09/activitypub-is-it-worth-defending-against-replay-attacks-and-message-signature-time-skew/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[A reasonably practical guide to validating RFC 9421 HTTP Signatures for ActivityPub in PHP]]></title>
		<link>https://shkspr.mobi/blog/2026/09/a-reasonably-practical-guide-to-validating-rfc-9421-http-signatures-for-activitypub-in-php/</link>
					<comments>https://shkspr.mobi/blog/2026/09/a-reasonably-practical-guide-to-validating-rfc-9421-http-signatures-for-activitypub-in-php/#comments</comments>
				<dc:creator><![CDATA[Terence Eden]]></dc:creator>
		<pubDate>Thu, 03 Sep 2026 11:34:12 +0000</pubDate>
		<category><![CDATA[ActivityBot]]></category><category><![CDATA[ActivityPub]]></category><category><![CDATA[mastodon]]></category><category><![CDATA[PHP]]></category><category><![CDATA[WebDev]]></category>		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=74429</guid>

					<description><![CDATA[If you&#039;re reading this, you&#039;ve probably been hitting your head against a brick wall trying to parse and decipher the new HTTP Signatures sent by Mastodon and other Fediverse servers.  This is a basic and somewhat incomplete guide to accepting these signatures. I&#039;m sure there are various gotchas, but it works with the signatures I&#039;ve seen in the wild.  Shut Up And Show Me The Code!  OK, wow, no…]]></description>
										<content:encoded>&lt;p&gt;If you're reading this, you've probably been hitting your head against a brick wall trying to parse and decipher the new HTTP Signatures sent by Mastodon and other Fediverse servers.&lt;/p&gt;

&lt;p&gt;This is a basic and somewhat incomplete guide to accepting these signatures. I'm sure there are various gotchas, but it works with the signatures I've seen in the wild.&lt;/p&gt;

&lt;h2 id="shut-up-and-show-me-the-code"&gt;&lt;a href="https://shkspr.mobi/blog/2026/09/a-reasonably-practical-guide-to-validating-rfc-9421-http-signatures-for-activitypub-in-php/#shut-up-and-show-me-the-code"&gt;Shut Up And Show Me The Code!&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;OK, wow, no need to be a dick about it! Here's how I validated a real signature that my server received. This requires PHP 8.4 or newer.&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-php"&gt;$verified = openssl_verify(
    data:       '"@method": POST
"@target-uri": https://example.viii.fi/inbox
"content-digest": sha-256=:tFdB/ENGczHMlZMDb66pXoUi2d0OqH2iBHdnN/WV1mc=:
"@signature-params": ("@method" "@target-uri" "content-digest");created=1787780262;keyid="https://mastodon.social/users/Edent#main-key"',
    signature:  base64_decode( "sIfmNsM/Q8iG6AJlne1IkZVjQSVFDEYIPsnoSOXQY+W3Eb4+SOn9o4J5SQmFOP+Jecjf3ioFwUdsrFjAGkUUOHPvSbNWkGKtNuGm+C6r3aI3JBCFGPqX3ITgZYV76CF7JJJ5hPGaG8YH/XdmxVIeFfD3M39FQCncMyyq7xJJvwKKP1mzS5s1vNQie8hbQ9owRjtqvoWcmM9GEYCUHNcMPLjZc+CBrj8sfBbNTYgIFI4UtirOaRJvYymxXjmXuzeVYxQujMjAjgobxQ8QFv0zlYsHk+gS5EYyafpJG9zmfCFSoF9+ZwqKNADmuADbISD9LZIH/bmkPoNXhxaeFPqYog==" ),
    public_key: "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsYMEs4waqk/6gaS+xn1T\nYygElTtNIFNkBcEdEBMaeoGVhyZiVKtSjJCS4z+X+394PKvcfSTcFILIt2GI2jOB\nHD0M2fFgxc8mmdSdCQkgEh9jF3bFI3kopDvzYf726iioYKlHXKpfPKvFt7EJgKH7\naCtS25NQkek3YUd6y3VBcT3R6Xhze9P3QNoZMIsFXklgXDKj+EllfbUqLf1vxt3s\nmD9ETxy2bJi9FheE0uY2WhARn49XAvwczM5Wzt+zqxVEtgpi5v2+ZZAVKhDnJkiC\nCCuI6hrSnKNIx/5mSlX0a0S5h5d03djrCkYsqmwelu01rhOXP2grsz4BXp0y2wrO\n3QIDAQAB\n-----END PUBLIC KEY-----\n",
    algorithm:  "sha256"
);

echo $verified;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Copy and paste that into PHP and you should see that &lt;code&gt;$verified&lt;/code&gt; is true.&lt;/p&gt;

&lt;h2 id="now-explain-the-code"&gt;&lt;a href="https://shkspr.mobi/blog/2026/09/a-reasonably-practical-guide-to-validating-rfc-9421-http-signatures-for-activitypub-in-php/#now-explain-the-code"&gt;NOW EXPLAIN THE CODE&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Say please.&lt;/p&gt;

&lt;h2 id="please"&gt;&lt;a href="https://shkspr.mobi/blog/2026/09/a-reasonably-practical-guide-to-validating-rfc-9421-http-signatures-for-activitypub-in-php/#please"&gt;PLEASE!!!&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Along with the message sent to your server, you will have received HTTP headers like this:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-_"&gt;content-digest: sha-256=:tFdB/ENGczHMlZMDb66pXoUi2d0OqH2iBHdnN/WV1mc=:
signature: sig1=:sIfmNsM/Q8iG6AJlne1IkZVjQSVFDEYIPsnoSOXQY+W3Eb4+SOn9o4J5SQmFOP+Jecjf3ioFwUdsrFjAGkUUOHPvSbNWkGKtNuGm+C6r3aI3JBCFGPqX3ITgZYV76CF7JJJ5hPGaG8YH/XdmxVIeFfD3M39FQCncMyyq7xJJvwKKP1mzS5s1vNQie8hbQ9owRjtqvoWcmM9GEYCUHNcMPLjZc+CBrj8sfBbNTYgIFI4UtirOaRJvYymxXjmXuzeVYxQujMjAjgobxQ8QFv0zlYsHk+gS5EYyafpJG9zmfCFSoF9+ZwqKNADmuADbISD9LZIH/bmkPoNXhxaeFPqYog==:
signature-input: sig1=("@method" "@target-uri" "content-digest");created=1787780262;keyid="https://mastodon.social/users/Edent#main-key"
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The &lt;code&gt;signature-input&lt;/code&gt; tells you how to construct a "Signature Base". You have to build a text string which places the various components in the order specified and separated with a newline:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-_"&gt;"@method": POST
"@target-uri": https://example.viii.fi/inbox
"content-digest": sha-256=:tFdB/ENGczHMlZMDb66pXoUi2d0OqH2iBHdnN/WV1mc=:
"@signature-params": ("@method" "@target-uri" "content-digest");created=1787780262;keyid="https://mastodon.social/users/Edent#main-key"
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Where &lt;code&gt;@method&lt;/code&gt; is the HTTP method used to send data to your server (usually &lt;code&gt;GET&lt;/code&gt; or &lt;code&gt;POST&lt;/code&gt;), and &lt;code&gt;@target-uri&lt;/code&gt; is the URl the message was sent to (usually your inbox).&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;publicKey&lt;/code&gt; is slightly trickier. As you can see, the &lt;code&gt;signature-input&lt;/code&gt; ends with &lt;code&gt;keyid="https://mastodon.social/users/Edent#main-key&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If you make a signed request to that URl, you'll get back an ActivityPub Actor document. It will look something like this:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-json"&gt;{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://w3id.org/security/v1",
  ],
  "id": "https://mastodon.social/users/Edent",
  "webfinger": "Edent@mastodon.social",
  "type": "Person",
  "name": "Terence Eden",
  "publicKey": {
    "id": "https://mastodon.social/users/Edent#main-key",
    "owner": "https://mastodon.social/users/Edent",
    "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsYMEs4waqk/6gaS+xn1T\nYygElTtNIFNkBcEdEBMaeoGVhyZiVKtSjJCS4z+X+394PKvcfSTcFILIt2GI2jOB\nHD0M2fFgxc8mmdSdCQkgEh9jF3bFI3kopDvzYf726iioYKlHXKpfPKvFt7EJgKH7\naCtS25NQkek3YUd6y3VBcT3R6Xhze9P3QNoZMIsFXklgXDKj+EllfbUqLf1vxt3s\nmD9ETxy2bJi9FheE0uY2WhARn49XAvwczM5Wzt+zqxVEtgpi5v2+ZZAVKhDnJkiC\nCCuI6hrSnKNIx/5mSlX0a0S5h5d03djrCkYsqmwelu01rhOXP2grsz4BXp0y2wrO\n3QIDAQAB\n-----END PUBLIC KEY-----\n"
  },
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The &lt;code&gt;publicKeyPem&lt;/code&gt; is the string you need. There's no need to convert the &lt;code&gt;\n&lt;/code&gt; to literal newlines.&lt;/p&gt;

&lt;h2 id="is-that-it"&gt;&lt;a href="https://shkspr.mobi/blog/2026/09/a-reasonably-practical-guide-to-validating-rfc-9421-http-signatures-for-activitypub-in-php/#is-that-it"&gt;Is that it?&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Not quite! All we've done so far is verify the headers. It is possible that these are genuine headers but attached to a fraudulent body.&lt;/p&gt;

&lt;p&gt;This takes us back to the header &lt;code&gt;"content-digest": sha-256=:tFdB/ENGczHMlZMDb66pXoUi2d0OqH2iBHdnN/WV1mc=:&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;That says that the body of the message sent has a Base64 encoded SHA256 hash of &lt;code&gt;tFdB/ENGczHMlZMDb66pXoUi2d0OqH2iBHdnN/WV1mc=&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;To calculate your own content digest in PHP:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-php"&gt;$input = file_get_contents( "php://input" );
$digestCalculated = base64_encode(
    hash(
        algo: "sha256",
        data: $input,
        binary: true
    )
);
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Does your digest match the one sent along with the headers? If not, something dodgy is going on.&lt;/p&gt;

&lt;h2 id="putting-it-all-together"&gt;&lt;a href="https://shkspr.mobi/blog/2026/09/a-reasonably-practical-guide-to-validating-rfc-9421-http-signatures-for-activitypub-in-php/#putting-it-all-together"&gt;Putting it all together&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;The steps are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Get the headers.&lt;/li&gt;
&lt;li&gt;Get the body.&lt;/li&gt;
&lt;li&gt;From the headers' &lt;code&gt;content-digest&lt;/code&gt; extract the algorithm and hash.&lt;/li&gt;
&lt;li&gt;Using the body, calculate your own hash using the algorithm from &lt;code&gt;content-digest&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Does your hash match the sent hash? If not, stop. If so, proceed.&lt;/li&gt;
&lt;li&gt;From the headers' &lt;code&gt;signature&lt;/code&gt; extract the base64 encoded signature.&lt;/li&gt;
&lt;li&gt;From the headers' &lt;code&gt;signature-input&lt;/code&gt; extract the signature-input string.&lt;/li&gt;
&lt;li&gt;From the signature-input string extract the order of the Signature Base.&lt;/li&gt;
&lt;li&gt;Construct the Signature Base.&lt;/li&gt;
&lt;li&gt;From the signature-input string extract the keyid.&lt;/li&gt;
&lt;li&gt;Get the Public Key from the keyid.&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;openssl_verify()&lt;/code&gt; to verify the Signature Base and the base64 decoded signature, against the Public Key using SHA256.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Note, &lt;a href="https://docs.joinmastodon.org/spec/security/#http-message-signatures"&gt;Mastodon &lt;em&gt;only&lt;/em&gt; uses SHA256&lt;/a&gt;.  I think it should explicitly say which algorithm it is using &lt;a href="https://github.com/mastodon/mastodon/issues/29905#issuecomment-5440336919"&gt;and have raised the issue&lt;/a&gt;.&lt;/p&gt;

&lt;h3 id="in-code-form"&gt;&lt;a href="https://shkspr.mobi/blog/2026/09/a-reasonably-practical-guide-to-validating-rfc-9421-http-signatures-for-activitypub-in-php/#in-code-form"&gt;In Code Form&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;This is how you do it in PHP. Please read this carefully as there are some hard-coded assumptions.&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-php"&gt;&amp;lt;?php

//  Validate the Digest.
//  It is the hash of the raw input string, in binary, encoded as base64.

//  The format is content-digest =&amp;gt; &amp;lt;algorithm&amp;gt;=:&amp;lt;base64 encoded hash&amp;gt;:
$digestString = $headers["content-digest"];
//  The Base64 encoding may have multiple `=` at the end. So split this at the first `=`.
$digestData = explode( separator: "=", string: $digestString, limit: 2 );

//  Hashes are in lowercase, but have a `-` in their name.
//  This is not what hash_algos() expects.
$digestAlgorithm = str_replace( search: "-", replace: "", subject: $digestData[0] );

//  The hash is surrounded by `:` characters.
$digestHash = str_replace( search: ":", replace: "", subject: $digestData[1] );

//  Check if the hash algorithm is one known about to PHP.
//  If not, reject and record an error.
if ( !in_array( needle:$digestAlgorithm, haystack: hash_algos() ) ) {
    return false;
}

//  Manually calculate the digest based on the data sent.
$digestCalculated = base64_encode( hash( algo: $digestAlgorithm, data: $input, binary: true ) );

//  Does our calculation match what was sent?
if ( !( $digestCalculated == $digestHash ) ) {
    return false;
}

//  The signature format is signature =&amp;gt; &amp;lt;signature name&amp;gt;=:&amp;lt;base64 encoded hash&amp;gt;:
$signatureString = $headers["signature"];
//  The Base64 encoding may have multiple `=` at the end. So split this at the first `=`.
$signatureData = explode( separator: "=", string: $signatureString, limit: 2 );
$signatureName = $signatureData[0];

//  The signature is surrounded by `:` characters.
$signatureB64 = str_replace( search: ":", replace: "", subject: $signatureData[1] );

//  The signature-input format is complicated!
$signatureInputString = $headers["signature-input"];

//  Get the parameters. Assume there is only one signature.
$signatureParamsString = explode( separator: "=", string: $signatureInputString, limit: 2 )[1];

//  Get the different elements of the signature.
$signatureInputData = explode( separator: ";", string: $signatureInputString );

//  Construct the data.
$signatureInput = [];
foreach( $signatureInputData as $signatureInputParts ) {
    $partsData = explode( separator: "=", string: $signatureInputParts );
    //  Strip quotes from keyid and parentheses from sig1.
    if ( "keyid" == $partsData[0] ) {
        $partsData[1] = str_replace( search: "\"", replace: "", subject: $partsData[1] );
    }

    if ( $signatureName == $partsData[0] ) {
        $partsData[1] = str_replace( search: ["(", ")"], replace: "", subject: $partsData[1] );
    }

    $signatureInput[ $partsData[0] ] = $partsData[1] ;
}

$signatureStructure = $signatureInput[$signatureName];
$signatureKeyID     = $signatureInput["keyid"];

//  Remove quotes.
$signatureStructure = str_replace( search: "\"", replace: "", subject: $signatureStructure );
$signatureStructureData = explode( separator: " ", string: $signatureStructure );

//  https://www.rfc-editor.org/info/rfc9421/#section-2.5
$signatureBase = "";
foreach ( $signatureStructureData as $signatureStructureParts ) {
    if ( "@method" == $signatureStructureParts ) {
        //  https://www.rfc-editor.org/info/rfc9421/#name-method
        $signatureBase .= "\"@method\": " . $_SERVER["REQUEST_METHOD"] . "\n";
    }
    if ( "@target-uri" == $signatureStructureParts ) {
        //  https://www.rfc-editor.org/info/rfc9421/#section-2.2.2
        //  Change the domain name to your own.
        $signatureBase .= "\"@target-uri\": https://EXAMPLE.COM" . $_SERVER["REQUEST_URI"] . "\n";
    }
    if ( "content-digest" == $signatureStructureParts ) {
        $signatureBase .= "\"content-digest\": $digestString\n";
    }
}

//  https://victoronsoftware.com/posts/http-message-signatures/#how-the-signature-is-created
$signatureBase .= "\"@signature-params\": $signatureParamsString";

//  Get the signing user's public key.
//  This is usually in the form `https://example.com/user/username#main-key`
//  This is to differentiate if the user has multiple keys.
//  This may need to be a signed request. You will need to write your own getDataFromURl() function to get the sending user's key.
$userData  = getDataFromURl( $signatureKeyID );
$publicKey = $userData["publicKey"]["publicKeyPem"];

//  Verify the request
$verified = openssl_verify(
    data:       $signatureBase,
    signature:  base64_decode( $signatureB64 ),
    public_key: $publicKey,
    algorithm:  $digestAlgorithm
);

//  Convert the result to boolean.
if ( $verified === 1 ) {
    $verified = true;
} elseif ( $verified === 0 ) {
    $verified = false;
} else {
    $verified = null;
}

return $verified;
&lt;/code&gt;&lt;/pre&gt;

&lt;h2 id="further-reading"&gt;&lt;a href="https://shkspr.mobi/blog/2026/09/a-reasonably-practical-guide-to-validating-rfc-9421-http-signatures-for-activitypub-in-php/#further-reading"&gt;Further Reading&lt;/a&gt;&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.rfc-editor.org/info/rfc9421/"&gt;RFC 9421 HTTP Message Signatures&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://victoronsoftware.com/posts/http-message-signatures/"&gt;Understanding HTTP message signatures: A developer's guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.otoroshi.io/docs/tutorials/http-message-signatures-rfc9421/"&gt;Sign and verify HTTP messages (RFC 9421)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://darutk.medium.com/verification-of-http-message-signatures-501bbdc7dfec"&gt;Verification of HTTP Message Signatures&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/macgirvin/HTTP-Message-Signer"&gt;HTTP-Message-Signer in PHP&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id="thanks-to-nlnet"&gt;&lt;a href="https://shkspr.mobi/blog/2026/09/a-reasonably-practical-guide-to-validating-rfc-9421-http-signatures-for-activitypub-in-php/#thanks-to-nlnet"&gt;Thanks to NLnet&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;This blog post was funded in part by the work I'm doing for my NLnet NGI0 grant. Thanks!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://nlnet.nl/project/ActivityBot/"&gt;&lt;img src="https://shkspr.mobi/blog/wp-content/uploads/2026/08/NGI-logos.webp" alt="NLnet logo." width="900" height="200" class="aligncenter"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=74429&amp;amp;HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager"&gt;</content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2026/09/a-reasonably-practical-guide-to-validating-rfc-9421-http-signatures-for-activitypub-in-php/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[ActivityBot is the recipient of an NLnet grant!]]></title>
		<link>https://shkspr.mobi/blog/2026/08/activitybot-is-the-recipient-of-an-nlnet-grant/</link>
					<comments>https://shkspr.mobi/blog/2026/08/activitybot-is-the-recipient-of-an-nlnet-grant/#comments</comments>
				<dc:creator><![CDATA[Terence Eden]]></dc:creator>
		<pubDate>Sun, 30 Aug 2026 11:34:55 +0000</pubDate>
		<category><![CDATA[ActivityBot]]></category><category><![CDATA[ActivityPub]]></category><category><![CDATA[fediverse]]></category><category><![CDATA[NLnet]]></category>		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=74406</guid>

					<description><![CDATA[Back in February, I applied for NLnet&#039;s Next Generation Zero grant. They were looking for Fediverse projects to help rewild the social media landscape. Or, as they describe it:  Reclaim the public nature of the internet  Small and medium-sized R&#38;D grants between 5.000 and 50.000 euro, with the possibility to scale up.  I run ActivityBot - it is a single-file ActivityPub server suitable for…]]></description>
										<content:encoded>&lt;p&gt;Back in February, I applied for &lt;a href="https://nlnet.nl/NGI0/"&gt;NLnet's Next Generation Zero grant&lt;/a&gt;. They were looking for Fediverse projects to help rewild the social media landscape. Or, as they describe it:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Reclaim the public nature of the internet&lt;/p&gt;

&lt;p&gt;Small and medium-sized R&amp;amp;D grants between 5.000 and 50.000 euro, with the possibility to scale up.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;I run &lt;a href="https://gitlab.com/edent/activity-bot"&gt;ActivityBot&lt;/a&gt; - it is a single-file ActivityPub server suitable for launching automated accounts and designed as a learning tool for those who want to understand how the protocol works. Several people have told me how useful it is, but I haven't had the time to make it better. So I decided to stick in a last-minute application to the fund.&lt;/p&gt;

&lt;p&gt;I really didn't know how much to apply for - or even if my project would be suitable for funding - so I cheekily asked for €10,000. After a few months of back-and-forth, I'm delighted to announce that I was successful!&lt;/p&gt;

&lt;p&gt;In the spirit of openness, this blog post details how the NLnet grant process worked for me and what I'll be using the money for.&lt;/p&gt;

&lt;img src="https://shkspr.mobi/blog/wp-content/uploads/2026/08/NGI-logos.webp" alt="NLnet logo." width="900" height="200" class="aligncenter"&gt;

&lt;h2 id="the-process"&gt;&lt;a href="https://shkspr.mobi/blog/2026/08/activitybot-is-the-recipient-of-an-nlnet-grant/#the-process"&gt;The Process&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;The application was delightfully simple. Here's what it asked for, along with my answers. If you apply, please don't copy these verbatim; use your own words.&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Abstract    : A single file server for ActivityPub. Designed for write-only bots. Allows any project to quickly and easily start publishing automated content to the Fediverse. Uses PHP, no other dependencies.
&lt;/li&gt;&lt;li&gt;Experience  : I am the sole developer of Single File ActivityPub - https://gitlab.com/edent/activitypub-single-php-file&lt;br&gt;I was formerly the UK Government's representative to the W3C and have contributed to various ActivityPub projects and specifications.
&lt;/li&gt;&lt;li&gt;Amount      : € 10000
&lt;/li&gt;&lt;li&gt;Use         : The fund will be used for development, testing, promotional activity (including conference travel).&lt;br&gt;I anticipate this will fund 6 months of development. I have funded all previous development.&lt;br&gt;
&lt;/li&gt;&lt;li&gt;Comparison  : Most ActivityPub services are complex. They implement a full specification and are designed for multi-user environments. Other projects allow reading and writing. ActivityBot is deliberately designed to be as simple as possible. A single file to upload, one user, publish only.&lt;br&gt;This will enable more projects to be able to instantly start publishing with low development cost and close to zero hosting cost.
&lt;/li&gt;&lt;li&gt;Challenges  : Formal spec verification and a security audit will be the main technical challenges. The ActivityBot software has been running well for over a year. The funding will allow for better compatibility and security.
&lt;/li&gt;&lt;li&gt;Ecosystem   : The project has mostly targeted individuals who want to run small bots. After further development, the project will engage with IoT providers, smaller publishers, open source projects who wish to publish updates, and other relevant parties.
&lt;/li&gt;&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;I was told there was intense competition. After a couple of months, I received word that I'd made it to the 2nd round.&lt;/p&gt;

&lt;p&gt;What then followed was a &lt;em&gt;very&lt;/em&gt; polite interrogation about my ideas, how I would develop the project, what I would use the money for, and what my AI usage policy was.  They also wanted a breakdown of the main tasks - with the understanding that this would be a provisional document subject to change.&lt;/p&gt;

&lt;p&gt;I was on &lt;a href="https://shkspr.mobi/blog/2026/07/another-ridiculous-interrail-holiday-6379km-and-13-countries-over-7-weeks/"&gt;a train through Europe&lt;/a&gt; when I wrote this. I don't claim it to be a brilliant document - but it got the job done!&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;1. User Research

&lt;/p&gt;&lt;p&gt;Recruit 2 - 5 potential users. Offer an incentive (approx £20ea) to participate in a user research session. Study design will take 1 - 2 days. Each interview and write up to take 1 day. Consolidation and report 2 days.

&lt;/p&gt;&lt;p&gt;Total effort 3 - 4 weeks.

&lt;/p&gt;&lt;p&gt;2. Standards Research

&lt;/p&gt;&lt;p&gt;Participate in ActivityPub user communities and standardisation groups. Attend virtual conferences (or any local to the UK). Approx 1 day per week for 6 months.

&lt;/p&gt;&lt;p&gt;3. Test Driven Development

&lt;/p&gt;&lt;p&gt;Create modern test harness, write test suite, iterate design based on tests. Anticipated effort 2 days per week for approx 3 months.

&lt;/p&gt;&lt;p&gt;4. Security Testing

&lt;/p&gt;&lt;p&gt;Work with the community and security professionals to test the resultant code. This will use human testers and normal fuzzers - this will not use AI tools. Anticipated effort 2 days per week for approx 2 months.

&lt;/p&gt;&lt;p&gt;5. User Acceptance Testing

&lt;/p&gt;&lt;p&gt;Recruit 2 - 5 potential users (ideally different to the research participants). Offer an incentive (approx £20ea) to participate in a user acceptance session. Study design will take 1 - 2 days. Each interview and write up to take 1 day. Consolidation and report 2 days.

&lt;/p&gt;&lt;p&gt;Total effort 3 - 4 weeks.

&lt;/p&gt;&lt;p&gt;6. Updates Based on Research, Testing, and Security

&lt;/p&gt;&lt;p&gt;While it would be lovely to anticipate getting everything right first time, the reality is that changes will need to be made based on the findings of the above. This will take up the remainder of the allocated time.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Again, there was a little more back and forth. But a few weeks later I was informed that I was at the final stage, pending review. And, a few weeks after that, I was told my project had been given the green light.&lt;/p&gt;

&lt;p&gt;I was invited to a group call where the very friendly team discussed the practicalities of the grant, what it could and couldn't fund. I also met a bunch of other people who'd also won.&lt;/p&gt;

&lt;p&gt;The final stage was writing a proper Memorandum of Understanding. With the help of one of the team (thanks Victoria!) I was able to turn my scrappy plan into something a bit more formal. The project tool NLnet uses made it easy to build up a plan and put € amounts by each task.&lt;/p&gt;

&lt;p&gt;The idea is that I will invoice against the grant whenever I have completed a task or sub-task. Obviously I don't want to leave invoicing until the end of the project, but I also need to be mindful of the foreign exchange fees charged by my bank for receiving Euro payments.&lt;/p&gt;

&lt;h2 id="final-project-plan"&gt;&lt;a href="https://shkspr.mobi/blog/2026/08/activitybot-is-the-recipient-of-an-nlnet-grant/#final-project-plan"&gt;Final Project Plan&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;This is the plan I submitted. It represents what I hope to accomplish and how I'll draw down on the grant. I suspect this will change as the months go on.&lt;/p&gt;

&lt;hr&gt;

&lt;p&gt;ActivityBot is an Open Source project which aims to develop, maintain, and improve a minimum viable ActivityPub server in a single PHP file.&lt;/p&gt;

&lt;p&gt;The project is run by Terence Eden (trading as @edent); a developer residing in England.&lt;/p&gt;

&lt;p&gt;This project is expected to run for approximately 6 months. All of the deliverables will be openly licenced using either an OSI approved software licence or a Creative Commons licence.&lt;/p&gt;

&lt;p&gt;The high-level aims of the project are for ActivityBot to be:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;A fully compliant ActivityPub server, running in a single PHP file.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A teaching tool to help developers understand the practical aspects of creating an ActivityPub server.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A practical method of publishing automated messages to the Fediverse.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A promotional tool to show how simple and easy ActivityPub development can be.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A secure and usable tool written in modern PHP.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Written by humans, with no AI/LLM generated code.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In light of NLnet's non-profit status, costs assume a discounted rate of €330 per day (£280). Incidentals such as hardware, software, travel, or sundries will be charged at cost with receipts provided.&lt;/p&gt;

&lt;h2 id="prepare-for-initial-release"&gt;&lt;a href="https://shkspr.mobi/blog/2026/08/activitybot-is-the-recipient-of-an-nlnet-grant/#prepare-for-initial-release"&gt;Prepare for initial release&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Ensure that the project is in a suitable state for initial release and future development.&lt;/p&gt;

&lt;p&gt;Deliverable: Updates published to GitLab.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;€495 Prepare initial release. Clarify licencing, solicit community engagement, include example usage.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;€495 Standards Research. Collation of standards websites. Ensure code comments refer to specific standards. Publish blog post(s) about findings for others to reference.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id="user-research"&gt;&lt;a href="https://shkspr.mobi/blog/2026/08/activitybot-is-the-recipient-of-an-nlnet-grant/#user-research"&gt;User Research&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Recruit up to 10 participants for a user-research study. Participants should represent the diversity of the Fediverse.&lt;/p&gt;

&lt;p&gt;Investigate what participants want from a tool like ActivityPub. The project plan may be adapted following the results of this study.&lt;/p&gt;

&lt;p&gt;Deliverable: Study plan and results will be published and given a Creative Commons licence. Changes based on the results will be pushed to GitLab.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;€660 Study Design and recruitment of participants (blog post published as deliverable).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;€990 Two days of user interviews, write up and publish results as blog post.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id="test-driven-development"&gt;&lt;a href="https://shkspr.mobi/blog/2026/08/activitybot-is-the-recipient-of-an-nlnet-grant/#test-driven-development"&gt;Test Driven Development&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Create a modern test harness, write test suite, iterate design based on tests.&lt;/p&gt;

&lt;p&gt;Deliverable: Tests published to GitLab. Blog posts published about the process and results.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;€330 Set up test suite&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;€330 Write tests&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;€330 Fixes based on test results&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id="security-testing"&gt;&lt;a href="https://shkspr.mobi/blog/2026/08/activitybot-is-the-recipient-of-an-nlnet-grant/#security-testing"&gt;Security Testing&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Working with NLnet's security offering, ensure that the project meets modern security requirements.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;€720 Work with security team to assess security risks and possible mitigations. Fixes based on security team feedback&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Deliverable: Updates published to GitLab. Blogs published about the process and results.&lt;/p&gt;

&lt;h2 id="user-acceptance-testing"&gt;&lt;a href="https://shkspr.mobi/blog/2026/08/activitybot-is-the-recipient-of-an-nlnet-grant/#user-acceptance-testing"&gt;User Acceptance Testing&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Recruit up to 10 participants for a user-acceptance study. Participants should represent the diversity of the Fediverse.&lt;/p&gt;

&lt;p&gt;Investigate whether participants are able to use ActivityBot. See which aspects need improvement. The project plan may be adapted following the results of this study.&lt;/p&gt;

&lt;p&gt;Deliverable: Study plan and results will be published and given a Creative Commons licence. Changes based on feedback will be published to GitLab.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;€660 Study Design and recruitment of participants (blog post published as deliverable).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;€990 Two days of user interviews, write up and publish results as blog post.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id="conferences-and-standards-work"&gt;&lt;a href="https://shkspr.mobi/blog/2026/08/activitybot-is-the-recipient-of-an-nlnet-grant/#conferences-and-standards-work"&gt;Conferences and Standards Work&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Open Source participation often depends on attending conferences, either in person or virtually. Getting involved in the standardisation process ensures that future versions of ActivityPub and associated standards will be suitable for the community.&lt;/p&gt;

&lt;p&gt;Deliverables: Presentations material (slideware), speaking at conferences (may be published as video), conference outputs. Where possible, these will be available under a suitable Creative Commons licence.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;€700 Travel and accommodation to one EU conference&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;€330 Publishing blog posts about ActivityPub standards work.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;€330 Publishing blog posts about ActivityPub standards work.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id="final-release"&gt;&lt;a href="https://shkspr.mobi/blog/2026/08/activitybot-is-the-recipient-of-an-nlnet-grant/#final-release"&gt;Final release&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Creating a final release for this phase of the ActivityBot project. This will involve incorporating all feedback received so far, improving documentation, and publishing code.&lt;/p&gt;

&lt;p&gt;Deliverable: Updates published to GitLab. Blog post written. Release announcements.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;€330 Phase 1: Process and implement feedback from users&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;€330 Phase 2: Bug fixes&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;€330 Phase 3: Features&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;€330 Phase 4: Bug fixes&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;€330 Phase 5: Features&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;€330 Phase 6: Remedial work&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;€330 Process and implement feedback from accessibility scan&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;€330 Final release&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id="next-steps"&gt;&lt;a href="https://shkspr.mobi/blog/2026/08/activitybot-is-the-recipient-of-an-nlnet-grant/#next-steps"&gt;Next Steps&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;I've already begun work on updating the code. If you'd like to get involved, or have suggestions or bug reports - please &lt;a href="https://gitlab.com/edent/activity-bot"&gt;take a look at ActivityBot on GitLab&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I'll be putting out a call for user-research participants once I've had a chance to catch my breath 😆&lt;/p&gt;
&lt;img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=74406&amp;amp;HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager"&gt;</content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2026/08/activitybot-is-the-recipient-of-an-nlnet-grant/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[[RSS Club] I got an NLnet grant!]]></title>
		<link>https://shkspr.mobi/blog/2026/08/rss-club-i-got-an-nlnet-grant/</link>
					<comments>https://shkspr.mobi/blog/2026/08/rss-club-i-got-an-nlnet-grant/#respond</comments>
				<dc:creator><![CDATA[Terence Eden]]></dc:creator>
		<pubDate>Sat, 08 Aug 2026 11:34:15 +0000</pubDate>
		<category><![CDATA[ActivityBot]]></category><category><![CDATA[ActivityPub]]></category><category><![CDATA[RSS Club]]></category>		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=73757</guid>

					<description><![CDATA[Pssst! This post is only available to RSS/Atom subscribers. Tell your friends to subscribe  😊.  Just a quick one today, a more detailed blog coming soon - but I thought I&#039;d give RSS Club Members (you!) a sneak peek.  A few months ago I saw a post on Mastodon from NLnet - they were looking for Open Source projects to apply for grant funding. The deadline was less than 24 hours away, so I rushed in …]]></description>
										<content:encoded>&lt;p&gt;&lt;mark&gt;Pssst! This post is only available to RSS/Atom subscribers. Tell your friends to subscribe &lt;/mark&gt; 😊.&lt;/p&gt;

&lt;p&gt;Just a quick one today, a more detailed blog coming soon - but I thought I'd give RSS Club Members (you!) a sneak peek.&lt;/p&gt;

&lt;p&gt;A few months ago I saw a post on Mastodon from &lt;a href="https://social.nlnet.nl/@nlnet"&gt;NLnet&lt;/a&gt; - they were looking for Open Source projects to apply for grant funding. The deadline was less than 24 hours away, so I rushed in an application.&lt;/p&gt;

&lt;p&gt;There was a ping-pong of emails where I detailed more about what I planned to do, and where they kept me abreast of their timescales.&lt;/p&gt;

&lt;p&gt;Finally, after about 6 months, I received the most delightful email confirming my place in the programme!&lt;/p&gt;

&lt;p&gt;I'm officially part of the &lt;a href="https://nlnet.nl/thema/NGI0CommonsFund.html"&gt;NGI0 Commons Fund&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So, what's the project? Regular readers will remember that I created &lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/"&gt;ActivityBot&lt;/a&gt; as a lightweight, single-file, fully featured ActivityPub server. The grant will enable me to improve the code, test the usability, have a security audit, do some accessibility work, and make it more robust.&lt;/p&gt;

&lt;p&gt;I'm also going to need a logo 🤖&lt;/p&gt;

&lt;p&gt;You can &lt;a href="https://nlnet.nl/project/ActivityBot/"&gt;read more about the project on the NLnet site&lt;/a&gt;.&lt;/p&gt;

&lt;hr&gt;

&lt;p&gt;Because this is an RSS-only post, it doesn't support comments. You can &lt;a href="https://edent.tel/"&gt;get in touch with me&lt;/a&gt; if you'd like to say something nice.&lt;/p&gt;
&lt;img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=73757&amp;amp;HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager"&gt;</content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2026/08/rss-club-i-got-an-nlnet-grant/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Some updates to ActivityBot]]></title>
		<link>https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/</link>
					<comments>https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#comments</comments>
				<dc:creator><![CDATA[Terence Eden]]></dc:creator>
		<pubDate>Mon, 16 Mar 2026 12:34:57 +0000</pubDate>
		<category><![CDATA[ActivityBot]]></category><category><![CDATA[ActivityPub]]></category><category><![CDATA[mastodon]]></category><category><![CDATA[PHP]]></category>		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=68592</guid>

					<description><![CDATA[I couple of years ago, I developed ActivityBot - the simplest way to build Mastodon Bots. It is a single PHP file which can run an entire ActivityPub server and it is less than 80KB.  It works! You can follow @openbenches@bot.openbenches.org to see the latest entries on OpenBenches.org, and @colours@colours.bots.edent.tel for a slice of colour in your day, and @solar@solar.bots.edent.tel to see…]]></description>
										<content:encoded>&lt;p&gt;I couple of years ago, I developed &lt;a href="https://shkspr.mobi/blog/2024/11/introducing-activitybot-the-simplest-way-to-build-mastodon-bots/"&gt;ActivityBot - the simplest way to build Mastodon Bots&lt;/a&gt;. It is a &lt;em&gt;single&lt;/em&gt; PHP file which can run an entire ActivityPub server and it is less than 80KB.&lt;/p&gt;

&lt;p&gt;It works! You can follow &lt;code&gt;@openbenches@bot.openbenches.org&lt;/code&gt; to see the latest entries on OpenBenches.org, and &lt;code&gt;@colours@colours.bots.edent.tel&lt;/code&gt; for a slice of colour in your day, and &lt;code&gt;@solar@solar.bots.edent.tel&lt;/code&gt; to see what my solar panels are up to.&lt;/p&gt;

&lt;p&gt;This is &lt;em&gt;so&lt;/em&gt; easy to use. Copy the PHP file (and a &lt;code&gt;.env&lt;/code&gt; and &lt;code&gt;.htaccess&lt;/code&gt;) to literally any web host running PHP 8.5 and you have a fully-fledged bot which can post to Mastodon.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://gitlab.com/edent/activity-bot/"&gt;Grab the code and start today&lt;/a&gt;!&lt;/p&gt;

&lt;h2 id="features"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#features"&gt;Features&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Over the years I've added a few more features to it, so I thought I'd run through what they are. Note, this is all hand-written. No sycophantic plagiarism machines were involved in this code or blog post. I just really like emoji, OK⁉️&lt;/p&gt;

&lt;h3 id="%f0%9f%94%8d-be-discovered-on-the-fediverse"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#%f0%9f%94%8d-be-discovered-on-the-fediverse"&gt;🔍 Be discovered on the Fediverse&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;This is the big one, you can find &lt;code&gt;@example@example.viii.fi&lt;/code&gt; on your favourite Fediverse client.  This is thanks to its WebFinger support.&lt;/p&gt;

&lt;h3 id="%f0%9f%91%89-be-followed-by-other-accounts"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#%f0%9f%91%89-be-followed-by-other-accounts"&gt;👉 Be followed by other accounts&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;No point being discovered if you can't be followed. This accepts follow requests and sends back a signed accept.&lt;/p&gt;

&lt;h3 id="%f0%9f%9a%ab-be-unfollowed-by-accounts"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#%f0%9f%9a%ab-be-unfollowed-by-accounts"&gt;🚫 Be unfollowed by accounts&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;Sometimes people want to unfollow. Too bad, so sad. Again, this will accept the undo request and delete the unfollowing user's information.&lt;/p&gt;

&lt;h3 id="%f0%9f%93%a9-send-messages-to-the-fediverse"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#%f0%9f%93%a9-send-messages-to-the-fediverse"&gt;📩 Send messages to the Fediverse&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;If a bot can be followed, but never posts, does it make a sound? This sends a post to all of your followers' (shared) inboxes. Includes some HTML formatting.&lt;/p&gt;

&lt;h3 id="%f0%9f%92%8c-send-direct-messages-to-users"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#%f0%9f%92%8c-send-direct-messages-to-users"&gt;💌 Send direct messages to users&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;Not every message is for the wider public. If you want a bot which sends you a private message, this'll set the visibility correctly.&lt;/p&gt;

&lt;h3 id="%f0%9f%93%b7-attach-images-alt-text-to-a-message-%f0%9f%86%95%f0%9f%86%95"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#%f0%9f%93%b7-attach-images-alt-text-to-a-message-%f0%9f%86%95%f0%9f%86%95"&gt;📷 Attach images &amp;amp; alt text to a message 🆕🆕&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;A picture is worth a thousand words. But those pictures are meaningless without alt text. Attach as many images as you like. Note, most Mastodon services only accept a maximum of four.&lt;/p&gt;

&lt;h3 id="%f0%9f%8d%bf-video-upload-%f0%9f%86%95%f0%9f%86%95"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#%f0%9f%8d%bf-video-upload-%f0%9f%86%95%f0%9f%86%95"&gt;🍿 Video Upload 🆕🆕&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;No transcoding or anything fancy. Upload a video and it'll be sent to your followers.&lt;/p&gt;

&lt;h3 id="%f0%9f%94%8a-audio-upload-%f0%9f%86%95%f0%9f%86%95"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#%f0%9f%94%8a-audio-upload-%f0%9f%86%95%f0%9f%86%95"&gt;🔊 Audio Upload 🆕🆕&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;Same as video. Raw audio posted to your followers' feeds.&lt;/p&gt;

&lt;h3 id="%f0%9f%95%b8%ef%b8%8f-autolink-urls-hashtags-and-mentions"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#%f0%9f%95%b8%ef%b8%8f-autolink-urls-hashtags-and-mentions"&gt;🕸️ Autolink URls, hashtags, and @ mentions&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;Including URls, tags, and mentions are &lt;em&gt;mostly&lt;/em&gt; autolinked correctly. There's a lot of fuzziness in how it works.&lt;/p&gt;

&lt;h3 id="%f0%9f%a7%b5-threads"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#%f0%9f%a7%b5-threads"&gt;🧵 Threads&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;You can reply to specific messages in order to create a thread.&lt;/p&gt;

&lt;h3 id="%f0%9f%91%88-follow-unfollow-block-and-unblock-other-accounts"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#%f0%9f%91%88-follow-unfollow-block-and-unblock-other-accounts"&gt;👈 Follow, Unfollow, Block, and Unblock other accounts&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;It might be useful for you to remove followers or follow specific accounts.&lt;/p&gt;

&lt;h3 id="%f0%9f%97%91%ef%b8%8f-delete-posted-messages-and-their-attachments-%f0%9f%86%95%f0%9f%86%95"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#%f0%9f%97%91%ef%b8%8f-delete-posted-messages-and-their-attachments-%f0%9f%86%95%f0%9f%86%95"&gt;🗑️ Delete posted messages and their attachments 🆕🆕&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;We all make mistakes. This will delete your post along with any attachments and send that delete message to everyone. Note, because of the federated nature of the Fediverse, you cannot guarantee that a remote server will delete anything.&lt;/p&gt;

&lt;h3 id="%e2%9c%8f%ef%b8%8f-edit-posts-%f0%9f%86%95%f0%9f%86%95"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#%e2%9c%8f%ef%b8%8f-edit-posts-%f0%9f%86%95%f0%9f%86%95"&gt;✏️ Edit Posts 🆕🆕&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;If you don't want to delete and re-post, you can edit your existing posts.&lt;/p&gt;

&lt;h3 id="%f0%9f%a6%8b-bridge-to-bluesky-with-your-domain-name-via-bridgy-fed"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#%f0%9f%a6%8b-bridge-to-bluesky-with-your-domain-name-via-bridgy-fed"&gt;🦋 Bridge to BlueSky with your domain name via Bridgy Fed&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;Not everyone is on the Fediverse. If you want to bridge to BlueSky, you can use the &lt;a href="https://fed.brid.gy/"&gt;Bridgy Fed service&lt;/a&gt;.&lt;/p&gt;

&lt;h3 id="%f0%9f%9a%9a-move-followers-from-an-old-account-and-to-a-new-account-%f0%9f%86%95%f0%9f%86%95"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#%f0%9f%9a%9a-move-followers-from-an-old-account-and-to-a-new-account-%f0%9f%86%95%f0%9f%86%95"&gt;🚚 Move followers from an old account and to a new account 🆕🆕&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;Perhaps you started as &lt;code&gt;@electric@sex.pants&lt;/code&gt; but now you want to become &lt;code&gt;@chaste@nunslife.biz&lt;/code&gt; - no worries! You can tell followers you've moved and what your new name is.&lt;/p&gt;

&lt;p&gt;Similarly, if ActivityBot is no longer right for you, it's simple to tell your existing follower to move to your new account.&lt;/p&gt;

&lt;h3 id="%f0%9f%97%a8%ef%b8%8f-allow-quote-posts-%f0%9f%86%95%f0%9f%86%95"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#%f0%9f%97%a8%ef%b8%8f-allow-quote-posts-%f0%9f%86%95%f0%9f%86%95"&gt;🗨️ Allow quote posts 🆕🆕&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;Rather than just reposting your message, this sets the quote policy to allow people to share your message and attach some commentary of your own.&lt;/p&gt;

&lt;h3 id="%f0%9f%91%80-show-followers"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#%f0%9f%91%80-show-followers"&gt;👀 Show followers&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;Your follower count isn't just a number, it is a living list of &lt;em&gt;who&lt;/em&gt; chooses to follow you.&lt;/p&gt;

&lt;h3 id="%e2%9a%a0%ef%b8%8f-content-warnings-%f0%9f%86%95%f0%9f%86%95"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#%e2%9a%a0%ef%b8%8f-content-warnings-%f0%9f%86%95%f0%9f%86%95"&gt;⚠️ Content Warnings 🆕🆕&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;Perhaps you want to hide a bit of what you're saying. Add a content warning to hide part of your message.&lt;/p&gt;

&lt;h3 id="%f0%9f%94%8f-verify-cryptographic-signatures"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#%f0%9f%94%8f-verify-cryptographic-signatures"&gt;🔏 Verify cryptographic signatures&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://shkspr.mobi/blog/2024/03/i-made-a-mistake-in-verifying-http-message-signatures/"&gt;HTTP Message Signatures is &lt;em&gt;hard&lt;/em&gt;&lt;/a&gt;. I think I've mostly got it sorted.&lt;/p&gt;

&lt;h3 id="%f0%9f%aa%b5-log-sent-messages-and-errors"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#%f0%9f%aa%b5-log-sent-messages-and-errors"&gt;🪵 Log sent messages and errors&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;This is primarily a learning aide, so have a rummage through the logs and see what's going on.&lt;/p&gt;

&lt;h3 id="%f0%9f%9a%ae-clear-logs-when-there-are-too-many"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#%f0%9f%9a%ae-clear-logs-when-there-are-too-many"&gt;🚮 Clear logs when there are too many&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;ActivityPub is a &lt;em&gt;chatty&lt;/em&gt; protocol. Your server can easily fill up with hundreds of thousands of messages from others. This regularly prunes down to something more manageable.&lt;/p&gt;

&lt;h3 id="%ef%b8%8f%e2%83%a3-hashed-passwords-for-posting-%f0%9f%86%95%f0%9f%86%95"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#%ef%b8%8f%e2%83%a3-hashed-passwords-for-posting-%f0%9f%86%95%f0%9f%86%95"&gt;#️⃣ Hashed passwords for posting 🆕🆕&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;Bit of a guilty moment here. I was originally storing the password in plaintext. Naughty! Passwords are now salted and hashed.&lt;/p&gt;

&lt;h3 id="%f0%9f%92%bb-basic-website-for-showing-posts"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#%f0%9f%92%bb-basic-website-for-showing-posts"&gt;💻 Basic website for showing posts&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;A nice-enough looking front end if people want to view the posts directly on your domain.&lt;/p&gt;

&lt;h2 id="some-deficiencies"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#some-deficiencies"&gt;Some Deficiencies&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Not every piece of software is perfect. ActivityBot is less perfect than most things. Here are some of the things it can't do and, perhaps, will never do.  If you'd like to help tackle any of these, &lt;a href="https://gitlab.com/edent/activity-bot/"&gt;fork the code from my git repo&lt;/a&gt;!&lt;/p&gt;

&lt;h3 id="%e2%8f%b3-retry-failed-messages"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#%e2%8f%b3-retry-failed-messages"&gt;⏳ Retry Failed Messages&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;A &lt;em&gt;proper&lt;/em&gt; Mastodon server will keep trying to send messages to unresponsive hosts. ActivityBot is one-and-done. If a remote server didn't respond in time, or was offline, or something else went wrong - it may not get the message.&lt;/p&gt;

&lt;h3 id="%f0%9f%94%84-reposts-announce-quote"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#%f0%9f%94%84-reposts-announce-quote"&gt;🔄 Reposts / Announce / Quote&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;You cannot boost other posts, or even your own. Nor can you send quote posts.&lt;/p&gt;

&lt;h3 id="%f0%9f%a4%96-act-on-instructions"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#%f0%9f%a4%96-act-on-instructions"&gt;🤖 Act On Instructions&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;This is a basic bot. It contains no logic. If you send it a message asking it to take action, it will not. You will need to build something else to make it truly interactive.&lt;/p&gt;

&lt;h3 id="%f0%9f%93%a5-receive-messages"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#%f0%9f%93%a5-receive-messages"&gt;📥 Receive Messages&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;In fact, other than the follow / unfollow stuff, the bot can't receive any messages from the Fediverse. It doesn't know when a post has been replied to, liked, or reposted.&lt;/p&gt;

&lt;h3 id="%f0%9f%98%8e-set-post-visibility"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#%f0%9f%98%8e-set-post-visibility"&gt;😎 Set Post Visibility&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;Your posts are either public or a DM. There's no support for things like quiet followers.&lt;/p&gt;

&lt;h3 id="%f0%9f%93%8a-create-polls"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#%f0%9f%93%8a-create-polls"&gt;📊 Create Polls&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;Everyone loves to vote on meaningless polls - but this is quite a hard problem for ActivityBot. It would need to keep track of votes, prevent double voting, and probably some other difficult stuff.&lt;/p&gt;

&lt;h3 id="%f0%9f%97%a8%ef%b8%8f-change-quote-post-visibility"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#%f0%9f%97%a8%ef%b8%8f-change-quote-post-visibility"&gt;🗨️ Change Quote Post Visibility&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;As quote posts are still quite new to Mastodon, I'm not sure how best to implement this.&lt;/p&gt;

&lt;h3 id="%f0%9f%94%97-proper-html-markdown-support"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#%f0%9f%94%97-proper-html-markdown-support"&gt;🔗 Proper HTML / Markdown Support&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;Autolinking names, hashtags, and links just about works - but not very reliably. In theory the bot &lt;em&gt;could&lt;/em&gt; parse Markdown and create richly formatted HTML from it. But that may require an external library which would bloat the size. Perhaps posting raw HTML could work?&lt;/p&gt;

&lt;h3 id="%f0%9f%96%bc%ef%b8%8f-focus-points-for-images"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#%f0%9f%96%bc%ef%b8%8f-focus-points-for-images"&gt;🖼️ Focus Points for Images&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;Perhaps of less use now, but still of interest to people?&lt;/p&gt;

&lt;h3 id="%e2%9d%93-other-stuff"&gt;&lt;a href="https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/#%e2%9d%93-other-stuff"&gt;❓ Other Stuff&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;I don't know what I don't know. Maybe some stuff is total broken? Maybe it is wildly out of spec? If you spot something dodgy, please let me know or &lt;a href="https://gitlab.com/edent/activity-bot/"&gt;raise a Pull Request&lt;/a&gt;.&lt;/p&gt;
&lt;img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=68592&amp;amp;HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager"&gt;</content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2026/03/some-updates-to-activitybot/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
