v1.18.x
barisusakli 8 years ago
parent 938022a0f7
commit 8f916343f0

@ -147,12 +147,15 @@ module.exports = function (Posts) {
db.sortedSetsRemove(['posts:pid', 'posts:flagged'], pid, next); db.sortedSetsRemove(['posts:pid', 'posts:flagged'], pid, next);
} }
], function (err) { ], function (err) {
if (err) { next(err);
return next(err);
}
plugins.fireHook('action:post.purge', {pid: pid, uid: uid});
db.delete('post:' + pid, next);
}); });
},
function (next) {
Posts.getPostData(pid, next);
},
function (postData, next) {
plugins.fireHook('action:post.purge', {post: postData, uid: uid});
db.delete('post:' + pid, next);
} }
], callback); ], callback);
}; };

Loading…
Cancel
Save