Node.js based forum software built for the modern web
feat: upgrade script to re-assert all known actors to save URL into hash, and bump mentions
Julian Lam943cef6da261
diff --git a/install/package.json b/install/package.jsonindex 75b011bbb9..f4133ad8ee 100644--- a/install/package.json+++ b/install/package.json@@ -99,7 +99,7 @@"nodebb-plugin-emoji": "5.1.13","nodebb-plugin-emoji-android": "4.0.0","nodebb-plugin-markdown": "13.0.0-pre.3",- "nodebb-plugin-mentions": "4.4.3",+ "nodebb-plugin-mentions": "4.4.4","nodebb-plugin-ntfy": "1.7.4","nodebb-plugin-spam-be-gone": "2.2.1","nodebb-rewards-essentials": "1.0.0",diff --git a/src/upgrades/4.0.0/remote_user_urls.js b/src/upgrades/4.0.0/remote_user_urls.jsnew file mode 100644index 0000000000..9469d6cf93--- /dev/null+++ b/src/upgrades/4.0.0/remote_user_urls.js@@ -0,0 +1,18 @@+// REMOVE THIS PRIOR TO 4.0 ALPHA++'use strict';++// eslint-disable-next-line no-unused-vars+const db = require('../../database');+const activitypub = require('../../activitypub');++module.exports = {+ name: 'Re-assert all existing actors to save URL into hash',+ timestamp: Date.UTC(2024, 3, 4),+ method: async () => {+ const batch = require('../../batch');+ const { progress } = this;++ await batch.processSortedSet('usersRemote:lastCrawled', async ids => await activitypub.actors.assert(ids, { update: true }), { progress });+ },+};