Skip to content

Node.js based forum software built for the modern web

fix: perform Link header check on note assertion only when skipChecks is falsy

Julian Lam953c051c2e54
diff --git a/src/activitypub/notes.js b/src/activitypub/notes.js
index 3b15ab0137..50ce01bf3c 100644
--- a/src/activitypub/notes.js
+++ b/src/activitypub/notes.js
@@ -63,7 +63,9 @@ Notes.assert = async (uid, input, options = { skipChecks: false }) => {
return null;
}
- id = (await activitypub.checkHeader(id)) || id;
+ if (!options.skipChecks) {
+ id = (await activitypub.checkHeader(id)) || id;
+ }
let chain;
let context = await activitypub.contexts.get(uid, id);