Node.js based forum software built for the modern web
feat: remove activities older than a week
Barış Soner Uşaklı9997189aeae7
diff --git a/src/activitypub/index.js b/src/activitypub/index.jsindex 3eec80eae1..1ab36c3773 100644--- a/src/activitypub/index.js+++ b/src/activitypub/index.js@@ -61,6 +61,7 @@ ActivityPub.startJobs = () => {new CronJob('0 0 * * *', async () => {try {await ActivityPub.notes.prune();+ await db.sortedSetsRemoveRangeByScore(['activities:datetime'], '-inf', Date.now() - 604800000);} catch (err) {winston.error(err.stack);}