Skip to content

Node.js based forum software built for the modern web

fix: skip header checking during note assertion if test runner is active

Julian Lam7abdfd86ac87
diff --git a/src/activitypub/notes.js b/src/activitypub/notes.js
index e1fc16c175..b85d686f1e 100644
--- a/src/activitypub/notes.js
+++ b/src/activitypub/notes.js
@@ -71,7 +71,7 @@ Notes.assert = async (uid, input, options = { skipChecks: false }) => {
}
try {
- if (!options.skipChecks) {
+ if (!(options.skipChecks || process.env.hasOwnProperty('CI'))) {
id = (await activitypub.checkHeader(id)) || id;
}