diff --git a/lib/federation-setup.js b/lib/federation-setup.js index 42669ba..ce7be8c 100644 --- a/lib/federation-setup.js +++ b/lib/federation-setup.js @@ -162,6 +162,13 @@ export function setupFederation(options) { storeRawActivities, }); + // Enable authenticated fetches for the shared inbox. + // Without this, Fedify can't verify incoming HTTP Signatures from servers + // that require authorized fetch (e.g. hachyderm.io returns 401 on unsigned GETs). + // This tells Fedify to use our actor's key pair when fetching remote actor + // documents during signature verification on the shared inbox. + inboxChain.setSharedKeyDispatcher((_ctx) => ({ identifier: handle })); + // --- Collection dispatchers --- setupFollowers(federation, mountPath, handle, collections); setupFollowing(federation, mountPath, handle, collections); @@ -187,6 +194,14 @@ export function setupFederation(options) { }; }); + // Start the message queue for outbound activity delivery. + // Without this, ctx.sendActivity() enqueues delivery tasks but the + // InProcessMessageQueue never processes them — activities are never + // actually POSTed to follower inboxes. + federation.startQueue().catch((error) => { + console.error("[ActivityPub] Failed to start delivery queue:", error.message); + }); + return { federation }; } diff --git a/package.json b/package.json index 035dd99..592bff5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@rmdes/indiekit-endpoint-activitypub", - "version": "1.0.7", + "version": "1.0.8", "description": "ActivityPub federation endpoint for Indiekit via Fedify. Adds full fediverse support: actor, inbox, outbox, followers, following, syndication, and Mastodon migration.", "keywords": [ "indiekit",