Node.js based forum software built for the modern web
feat: remove activities older than a week
Barış Soner Uşaklıd9e86c7b07cd
diff --git a/src/activitypub/index.js b/src/activitypub/index.jsindex 08a33ecdf1..88f915691d 100644--- a/src/activitypub/index.js+++ b/src/activitypub/index.js@@ -63,6 +63,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);}