fix(patch): re-anchor ap-inbox-mention-self-guard to getTags() line shape
Deploy Indiekit Server / deploy (push) Successful in 37s

The mention-self-guard patch anchored on the old `tag.type === "Mention"`
line. The activitypub fork (>= 32ea375) now reads inbound tags via getTags()
and matches on tag.constructor.name, so the old anchor no longer matched and a
fresh npm install would silently drop the self-guard (warn + continue). Updated
oldSnippet/newSnippet to the new line shape; verified both inbox patches
(self-create-gate + mention-self-guard) match the current fork source.
This commit is contained in:
Sven
2026-06-14 18:12:54 +02:00
parent ce1a6f3aed
commit a41b7ffff3
@@ -40,8 +40,10 @@ const patchSpecs = [
{ {
name: "ap-inbox-mention-self-guard", name: "ap-inbox-mention-self-guard",
marker: "// [patch] ap-inbox-mention-self-guard", marker: "// [patch] ap-inbox-mention-self-guard",
oldSnippet: ` if (tag.type === "Mention" && tag.href?.href === ourActorUrl) {`, // Upstream fork (>= 32ea375) reads mention tags via getTags() and matches on
newSnippet: ` if (tag.type === "Mention" && tag.href?.href === ourActorUrl && actorUrl !== ourActorUrl) { // [patch] ap-inbox-mention-self-guard`, // tag.constructor.name instead of tag.type. Anchor on the new line shape.
oldSnippet: ` if (tag.constructor?.name === "Mention" && tag.href?.href === ourActorUrl) {`,
newSnippet: ` if (tag.constructor?.name === "Mention" && tag.href?.href === ourActorUrl && actorUrl !== ourActorUrl) { // [patch] ap-inbox-mention-self-guard`,
}, },
]; ];