mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-26 08:31:22 +01:00
refactor: dont store ap pids in posts:pid
new zset postsRemote:pid in topic purge only make 1 db call to reduce counters
This commit is contained in:
@@ -79,7 +79,9 @@ module.exports = function (Posts) {
|
||||
deleteFromGroups(pids),
|
||||
deleteDiffs(pids),
|
||||
deleteFromUploads(pids),
|
||||
db.sortedSetsRemove(['posts:pid', 'posts:votes', 'posts:flagged'], pids),
|
||||
db.sortedSetsRemove([
|
||||
'posts:pid', 'posts:votes', 'posts:flagged', 'postsRemote:pid',
|
||||
], pids),
|
||||
Posts.attachments.empty(pids),
|
||||
activitypub.notes.delete(pids),
|
||||
db.deleteAll(pids.map(pid => `pid:${pid}:editors`)),
|
||||
|
||||
Reference in New Issue
Block a user