fix(patch): re-anchor ap-inbox-mention-self-guard to getTags() line shape
Deploy Indiekit Server / deploy (push) Successful in 37s
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:
@@ -40,8 +40,10 @@ const patchSpecs = [
|
||||
{
|
||||
name: "ap-inbox-mention-self-guard",
|
||||
marker: "// [patch] ap-inbox-mention-self-guard",
|
||||
oldSnippet: ` if (tag.type === "Mention" && tag.href?.href === ourActorUrl) {`,
|
||||
newSnippet: ` if (tag.type === "Mention" && tag.href?.href === ourActorUrl && actorUrl !== ourActorUrl) { // [patch] ap-inbox-mention-self-guard`,
|
||||
// Upstream fork (>= 32ea375) reads mention tags via getTags() and matches on
|
||||
// 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`,
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user