Skip to content

Node.js based forum software built for the modern web

chore: add test helper to activitypub file

Julian Lam4bc0031f587f
diff --git a/src/activitypub/helpers.js b/src/activitypub/helpers.js
index dd0b0c05ff..5a50e2e8ed 100644
--- a/src/activitypub/helpers.js
+++ b/src/activitypub/helpers.js
@@ -28,6 +28,16 @@ const sha256 = payload => crypto.createHash('sha256').update(payload).digest('he
const Helpers = module.exports;
+Helpers._test = (method, args) => {
+ // because I am lazy and I probably wrote some variant of this below code 1000 times already
+ setTimeout(async () => {
+ console.log(await method.apply(method, args));
+ }, 2500);
+};
+// process.nextTick(() => {
+// Helpers._test(activitypub.notes.assert, [1, `https://`]);
+// });
+
let _lastLog;
Helpers.log = (message) => {
if (!message) {