mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-19 11:01:11 +01:00
refactor: move resolve flags and activitypub.out.remove.context
after topic deletion
This commit is contained in:
@@ -20,16 +20,17 @@ module.exports = function (Topics) {
|
|||||||
]);
|
]);
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
db.sortedSetRemove(`cid:${cid}:pids`, pids),
|
db.sortedSetRemove(`cid:${cid}:pids`, pids),
|
||||||
resolveTopicPostFlags(pids, uid),
|
|
||||||
Topics.setTopicFields(tid, {
|
Topics.setTopicFields(tid, {
|
||||||
deleted: 1,
|
deleted: 1,
|
||||||
deleterUid: uid,
|
deleterUid: uid,
|
||||||
deletedTimestamp: Date.now(),
|
deletedTimestamp: Date.now(),
|
||||||
}),
|
}),
|
||||||
activitypub.out.remove.context(uid, tid),
|
|
||||||
]);
|
]);
|
||||||
|
await Promise.all([
|
||||||
await categories.updateRecentTidForCid(cid);
|
resolveTopicPostFlags(pids, uid),
|
||||||
|
activitypub.out.remove.context(uid, tid),
|
||||||
|
categories.updateRecentTidForCid(cid),
|
||||||
|
]);
|
||||||
};
|
};
|
||||||
|
|
||||||
async function resolveTopicPostFlags(pids, uid) {
|
async function resolveTopicPostFlags(pids, uid) {
|
||||||
|
|||||||
Reference in New Issue
Block a user