mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 12:16:54 +02:00
feat: upgrade script to re-assert all known actors to save URL into hash, and bump mentions
This commit is contained in:
18
src/upgrades/4.0.0/remote_user_urls.js
Normal file
18
src/upgrades/4.0.0/remote_user_urls.js
Normal file
@@ -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 });
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user