Commit Graph

307 Commits

Author SHA1 Message Date
Sven
25bcce2f1a docs: document resolveAuthor timeout fix for favourite/reblog (01f6f81)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 08:40:04 +01:00
Sven
78b9f77d96 docs: document favourite 404 fix and profile avatar/created_at fixes (a259c79, da89554)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 08:31:36 +01:00
Sven
5f388bc9d5 docs: document follower created_at fix and URL-type AP lookup (6c13eb8)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 07:31:23 +01:00
Sven
615dcd849d docs: document DM no-data and 404 follow-up fixes (4816033, 7b838ea)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 21:25:40 +01:00
Sven
61fbdcd7ae docs: document remote profile fix (lookupWithSecurity + timeouts)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 21:24:42 +01:00
Sven
728fa9d682 fix(deps): update activitypub fork (addTimelineItem wrong arg in DM path)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 21:04:03 +01:00
Sven
777b2cc306 fix(deps): update activitypub fork (DM no data — full status response)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 20:57:50 +01:00
Sven
2379a5e1d5 docs: document Mastodon API DM public post leak fix
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 20:48:43 +01:00
Sven
6678c67972 fix(deps): update activitypub fork (DM visibility=direct public post leak)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 20:45:28 +01:00
Sven
df4e4061a1 docs: document Mastodon client like/reblog fix and patch cleanup
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 20:29:27 +01:00
Sven
ab1912b24b fix(deps): update activitypub fork (resolveAuthor collection.get fix)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 20:28:24 +01:00
Sven
6f6641b34d docs: document removal of 11 obsolete AP patches
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 20:23:58 +01:00
Sven
18a946c9ea chore(patches): remove 10 obsolete AP patches now baked into fork
All of the following are now native in svemagie/indiekit-endpoint-activitypub:
- patch-ap-url-lookup-api (AP URL lookup endpoint)
- patch-ap-allow-private-address (allowPrivateAddress in federation-setup)
- patch-ap-like-note-dispatcher (fake-Note revert)
- patch-ap-like-activity-id (canonical Like activity id URI)
- patch-ap-like-activity-dispatcher (Like setObjectDispatcher)
- patch-ap-url-lookup-api-like (likeOf URL in /api/ap-url)
- patch-ap-remove-federation-diag (inbox diagnostic log removed)
- patch-ap-og-image (orphan, not in package.json)
- patch-ap-normalize-nested-tags (orphan, no-op)
- patch-ap-object-url-trailing-slash (orphan, no-op)

patch-ap-skip-draft-syndication kept — draft guard in syndicate() not yet in fork.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 20:21:26 +01:00
Sven
81abaee160 chore(patches): remove patch-ap-repost-commentary (baked into fork)
Repost commentary changes are now native in svemagie/indiekit-endpoint-activitypub.
Patch is no longer needed and was causing a duplicate repost block on every deploy.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 20:16:22 +01:00
Sven
dc850c350f fix(patches): update repost-commentary patch to detect native fork implementation
Fix D's old snippet (the bare `} else {` content block) still matched after
the fork absorbed the repost-commentary changes natively, causing a duplicate
`} else if (postType === "repost") {` block to be inserted on every deploy
and preventing startup. Added NATIVE_MARKER check for the fork's own repost
branch so the patch skips cleanly when the changes are already present.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 20:13:48 +01:00
Sven
c230feff7f docs: document 2026-03-22 activitypub upstream sync and merge artifact fixes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 20:03:37 +01:00
Sven
7087ad5375 chore(deps): sync activitypub fork with upstream/main
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 20:02:36 +01:00
Sven
9336705179 fix(deps): update activitypub fork (tags.pub direct follow workaround)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 20:01:00 +01:00
Sven
4b1dfa20be fix(patches): update federation-diag silence patch for new fork version
The fork added an Accept-header upgrade block between the diagnostic
log and the return statement, breaking the OLD_SNIPPET match. Patch
now handles both the original form and the updated form.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 17:26:12 +01:00
Sven
49e8a109c8 fix(deps): update activitypub fork (remove duplicate cachedUrl merge artifact)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 16:33:24 +01:00
Sven
c5a905b9be fix(deps): update activitypub fork (remove duplicate import merge artifact)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 16:30:14 +01:00
Sven
599312ba2f fix: bookmark main version 2026-03-22 16:27:44 +01:00
Sven
786cf5b7e9 fix(deps): update activitypub fork (duplicate import fix)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 15:56:24 +01:00
Sven
64b489d2bc chore(deps): sync activitypub fork with upstream/main (merge 14 behind commits)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 15:52:10 +01:00
Sven
33c10eafaf fix(deps): update activitypub fork (tags.pub AP JSON + signature fixes)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 15:31:48 +01:00
Sven
67eacf6b99 fix(webmention): livefetch v6 with diagnostic log + reset-stale v11
livefetch v6:
- Adds console.log showing which property links were built per post
  (e.g. "in-reply-to" for replies) — makes it debuggable without server access
- Fixes retryPatchedBlock to include the two comment lines the retry patch
  actually inserts (was missing them, causing "Target block not found" on
  fresh upstream → retry → livefetch path)
- Adds v5 to priorMarkersNoContinue with contentToProcess-line end detection
  so v5 → v6 in-place upgrade works correctly

reset-stale: bump to v11 to retry ca3d8 and any other posts stuck
before v5/v6 deployment.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 11:40:57 +01:00
Sven
3d361c85aa chore(deps): update activitypub fork to v3.8.1 (tags.pub hashtag discovery)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 11:27:03 +01:00
Sven
2a674c8eea feat(draft): prevent draft posts from being syndicated or federated
Add two new patches:
- patch-ap-skip-draft-syndication: guards the AP syndicator's syndicate()
  method against draft posts (mirrors existing unlisted visibility check)
- patch-microsub-compose-draft-guard: forwards post-status from microsub
  compose to Micropub and suppresses mp-syndicate-to targets for drafts

The syndicate endpoint DB queries already filter post-status != draft
(patch-federation-unlisted-guards). These patches add defence in depth
at the AP syndicator and at the microsub compose submission layer.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 11:10:23 +01:00
Sven
072b803308 chore: update youtube endpoint fork (fix double video embed)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 10:00:43 +01:00
svemagie
ad05bf3f04 Merge pull request #1 from svemagie/claude/fix-activitypub-og-image-CrCGI
fix(ap): fix OG image not included in ActivityPub activities
2026-03-21 21:17:13 +01:00
svemagie
58478f1885 Merge branch 'main' into claude/fix-activitypub-og-image-CrCGI 2026-03-21 21:16:59 +01:00
Claude
769720b33f fix(ap): use slug-only OG image path /og/{slug}.png
The previous fix incorrectly generated /og/{year}-{month}-{day}-{slug}.png
but the Eleventy blog generates OG images at /og/{slug}.png (e.g. /og/2615b.png).
Remove the unnecessary date extraction and simplify to slug-only.

https://claude.ai/code/session_0124D41vdLYE3DkJxhPqYthX
2026-03-21 20:04:19 +00:00
Sven
c0b9878033 fix(webmention): silence retry noise for all livefetch versions, bump stale migration to v10
retry patch: regex now matches [patched:livefetch] and [patched:livefetch:vN]
so it silently skips for any livefetch version, not just v2.

reset-stale: bump to v10 to retry posts stuck during v5 rollout.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 20:56:02 +01:00
Sven
bf97dab2ef docs: document upstream activitypub v3.7.1–3.7.5 merge
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 20:23:55 +01:00
Sven
bcbc2a284d docs: document 2026-03-19–21 changes (webmention, AP likes, repost commentary, AI patches)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 17:35:51 +01:00
Sven
2548825793 chore: silence github contribution log 2026-03-21 17:31:01 +01:00
Sven
109d39dd25 fix(activitypub): remove federation-diag inbox logging
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 15:47:23 +01:00
Sven
fad383dfee chore(deps): update activitypub fork to v3.6.8 (Mastodon Client API merge)
Pulls the merged upstream feat/mastodon-client-api branch into our fork
(svemagie/indiekit-endpoint-activitypub@f029c31). The fork now tracks
upstream v3.6.8 while retaining our custom additions.

What's new in the installed package:
- lib/mastodon/ — full Mastodon Client API compatibility layer (entities,
  middleware, routes, helpers, backfill-timeline, router)
- 13 additional locale files (es, fr, de, hi, id, it, nl, pt, sr, sv, zh, …)
- signatureTimeWindow and allowPrivateAddress built into federation-setup.js
  (patch-ap-allow-private-address now cleanly detects "already up to date")

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 15:27:04 +01:00
Sven
535e6f5e9c fix(activitypub): add Like vocab import in activity dispatcher patch
On fresh installs where the old wrong patch was never applied, Like was
absent from the @fedify/fedify/vocab imports, causing a ReferenceError
at startup. The dispatcher patch now adds Like to the import block if
missing, making it self-contained and install-order independent.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 09:05:34 +01:00
Sven
99d2e38066 fix(activitypub): serve AP-likes with canonical id and proper Like dispatcher
Replace the semantically incorrect fake-Note approach with strict AP protocol compliance:

- patch-ap-like-note-dispatcher: rewritten to revert the fake-Note block
- patch-ap-like-activity-id: adds canonical id URI to Like activities (AP §6.2.1)
- patch-ap-like-activity-dispatcher: registers setObjectDispatcher(Like, ...) so
  /activitypub/activities/like/{id} is dereferenceable (AP §3.1)
- patch-ap-url-lookup-api-like: /api/ap-url now returns the likeOf URL for AP-likes
  so the "Also on: Fediverse" widget's authorize_interaction flow opens the
  original Mastodon post on the remote instance

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 08:58:15 +01:00
Sven
34d5fde54d fix(syndicate): normalize syndication property to array before dedup check
Micropub's replaceEntries() stores single-value arrays as plain strings
(JF2 normalization). Spreading a string into [...str] gives individual
characters, so hasSyndicationUrl() never matches existing syndication URLs
and alreadySyndicated is always false — causing re-syndication on every
webhook trigger.

Fix: use [].concat() which safely handles both string and array values.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 07:49:18 +01:00
Sven
9668485b57 revert(deploy): remove syndication webhook (moved to blog repo)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 07:39:39 +01:00
Sven
b16c60adec feat(deploy): trigger syndication webhook after successful deployment
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 07:33:39 +01:00
Sven
396bd5ab6f chore: del script 2026-03-20 22:34:59 +01:00
Sven
17b93b3a2a fix(webmention): build synthetic h-entry from stored properties, drop live fetch
Root cause: blog.giersig.eu DNS resolves internally to 10.100.0.10 (the
indiekit admin nginx), which returns the login page for post URLs of
certain types (notes, photos, replies). Live page fetching is inherently
unreliable in this split-DNS / jailed setup.

The fix: indiekit already stores all microformat target URLs in MongoDB
(in-reply-to, like-of, bookmark-of, repost-of) and content.html has
inline links. We can build a synthetic h-entry HTML snippet directly
from post.properties — no network fetch required for the source post.

Bumps livefetch patch to v5:
- Replace live page fetch with synthetic HTML built from post.properties
- Handles string values, mf2 objects ({properties.url[0]}), and plain
  value strings for each microformat property
- Simplifies patch script: single full-block replacement handles all
  prior versions (v1–v4) via marker detection

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 22:23:30 +01:00
Sven
7f9f02bc36 fix(webmention): fetch live pages from public URL, not INTERNAL_FETCH_URL
Root cause: INTERNAL_FETCH_URL (10.100.0.10) points to the nginx reverse
proxy in front of indiekit's admin interface. Post URLs like /bookmarks/…
require authentication there, so the fetch returned the login page
("Anmelden - Indiekit") which has no .h-entry.

The blog HTML is served by an external host (GitHub Pages), reachable
from the jail over the public URL. INTERNAL_FETCH_URL should only be
used for indiekit API calls, not for fetching blog post pages.

Bumps livefetch patch to v4:
- Remove INTERNAL_FETCH_URL rewrite for live page fetches
- Fetch from postUrl (public URL) directly by default
- Add WEBMENTION_LIVEFETCH_URL env var as opt-in override for setups
  where a local static server can serve blog pages faster
- Add v3→v4 in-place upgrade logic to the patch script

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 22:04:10 +01:00
Claude
1cf5b01788 fix(ap): fix OG image not included in ActivityPub activities
Root cause: jf2-to-as2.js (both 842fc5af and 45f8ba9) uses a regex
expecting date-based URLs like /articles/YYYY/MM/DD/slug/ to extract
the post date for the OG image filename. This blog uses flat URLs like
/articles/slug/ so the regex never matches — no `image` property is
set on Note/Article ActivityPub objects and fediverse clients show no
preview card.

Fix:
- Add scripts/patch-ap-og-image.mjs: replaces the URL-pattern regex with
  slug-from-last-path-segment + date-from-properties.published, producing
  /og/{year}-{month}-{day}-{slug}.png matching the Eleventy OG filenames.
  Handles both 842fc5af (slug-only URL) and 45f8ba9 (date+slug) variants.
  Applied to both jf2ToActivityStreams() and jf2ToAS2Activity().
- Register patch in package.json postinstall and serve after patch-ap-repost-commentary.
- Bump package-lock.json to 45f8ba9 fork commit (correct date+slug filename
  format, likes-as-bookmarks, announce cc reverted).

https://claude.ai/code/session_0124D41vdLYE3DkJxhPqYthX
2026-03-20 14:39:21 +00:00
Sven
11d600058d fix(webmention): send Host header on internal fetches, add fetchUrl diagnostics
Without a Host header, nginx routes internal fetches to the wrong vhost
(sees the internal IP as Host), returning a page with no .h-entry and
causing all posts to retry indefinitely.

Bumps livefetch patch to v3:
- Sends `Host: blog.giersig.eu` when fetching via internal URL so nginx
  routes to the correct virtual host
- Logs the actual fetchUrl on every internal fetch
- Logs the first 200 chars of the response body when h-entry check fails
  so the root cause (wrong vhost, indiekit page, etc.) is visible
- Adds v2→v3 in-place upgrade logic to the patch script

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 14:48:58 +01:00
Sven
750267b175 fix: removed double quote on "h-entry\"" 2026-03-20 14:45:35 +01:00
Sven
fe0f347e49 chore(ai): remove custom AI patches superseded by upstream endpoint-posts@beta.44
- Remove patch-preset-eleventy-ai-frontmatter: upstream now writes AI
  frontmatter natively using hyphenated keys (ai-text-level etc.)
- Remove patch-endpoint-posts-ai-cleanup: upstream beta.44 natively
  removes empty ai-text-level/ai-code-level/ai-tools/ai-description fields
- Remove patch-endpoint-posts-ai-fields: upstream beta.44 has AI form UI
  inline in post-form.njk; our separate templates would have duplicated fields
- Remove patch-micropub-ai-block-resync: one-time stale-block migration,
  no longer relevant
- Remove patch-endpoint-posts-prefill-url: upstream beta.44 has native
  prefill from query params; our patch would have conflicted
- Remove patch-endpoint-posts-search-tags: upstream beta.44 has native
  search/filter/sort UI; patch already detected this and was a no-op
- Bump @rmdes/indiekit-endpoint-posts beta.25→beta.44,
  override beta.41→beta.44
- Update indiekit.config.mjs: remove camelCase ai field names from
  all postTypes.fields (ai-* fields now rendered inline by upstream)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 14:37:04 +01:00