From 3c8c027f5d111c1844c74ece3d18cd415b94b678 Mon Sep 17 00:00:00 2001 From: Sven Date: Wed, 18 Mar 2026 19:49:10 +0100 Subject: [PATCH] fix(patches): force unlisted visibility on OwnYourSwarm checkin posts OwnYourSwarm sends visibility:"private" which Indiekit doesn't recognise, causing checkin posts to slip through syndication and AP federation guards. Remove the !hasVisibility condition so checkins are always forced to "unlisted" regardless of what OwnYourSwarm sends. Co-Authored-By: Claude Opus 4.6 --- scripts/patch-endpoint-micropub-where-note-visibility.mjs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/patch-endpoint-micropub-where-note-visibility.mjs b/scripts/patch-endpoint-micropub-where-note-visibility.mjs index 6bb3f058..716fa4d3 100644 --- a/scripts/patch-endpoint-micropub-where-note-visibility.mjs +++ b/scripts/patch-endpoint-micropub-where-note-visibility.mjs @@ -17,9 +17,11 @@ const newCode = ` // Post type const type = getPostType(postTypes, properties); properties["post-type"] = type; - // Default OwnYourSwarm /where check-in notes to unlisted unless explicitly set. + // Force OwnYourSwarm /where check-in notes to unlisted so they are + // hidden from the blog, syndication targets, and ActivityPub federation. + // OwnYourSwarm may send visibility:"private" which Indiekit does not + // recognise, so we always override to "unlisted" for these posts. const hasCheckinProperty = Object.prototype.hasOwnProperty.call(properties, "checkin"); - const hasVisibility = Object.prototype.hasOwnProperty.call(properties, "visibility"); const syndicationValues = Array.isArray(properties.syndication) ? properties.syndication : properties.syndication @@ -31,7 +33,6 @@ const newCode = ` // Post type if ( type === "note" && - !hasVisibility && (hasCheckinProperty || hasSwarmSyndication) ) { properties.visibility = "unlisted";