fix: tests

This commit is contained in:
Barış Soner Uşaklı
2021-12-07 19:03:20 -05:00
parent 9627fa9029
commit 45d8157fee

View File

@@ -169,13 +169,16 @@ module.exports = function (Posts) {
db.setObjectField(pids.map(pid => `post:${pid}`), 'uid', toUid),
db.sortedSetRemoveBulk(bulkRemove),
db.sortedSetAddBulk(bulkAdd),
user.updatePostCount(toUid),
user.incrementUserReputationBy(toUid, repChange),
handleMainPidOwnerChange(postData, toUid),
reduceCounters(postsByUser),
updateTopicPosters(postData, toUid),
]);
await Promise.all([
user.updatePostCount(toUid),
reduceCounters(postsByUser),
]);
plugins.hooks.fire('action:post.changeOwner', {
posts: _.cloneDeep(postData),
toUid: toUid,