Skip to content

Node.js based forum software built for the modern web

return early

Barış Soner Uşaklı0bac70353069
diff --git a/src/activitypub/notes.js b/src/activitypub/notes.js
index fa59c8450c..b09ee6b3db 100644
--- a/src/activitypub/notes.js
+++ b/src/activitypub/notes.js
@@ -778,7 +778,9 @@ async function pruneCidTids(cid, cuttoff) {
max: cuttoff,
batch: 500,
});
-
+ if (!tidsWithNoEngagement.length) {
+ return;
+ }
winston.info(`[notes/prune] ${tidsWithNoEngagement.length} topics eligible in cid:${cid} for pruning`);
await batch.processArray(tidsWithNoEngagement, async (tids) => {