add postData to action:post.delete, closes #5360

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

@ -29,6 +29,7 @@ module.exports = function (Posts) {
topics.getTopicFields(_post.tid, ['tid', 'cid', 'pinned'], next); topics.getTopicFields(_post.tid, ['tid', 'cid', 'pinned'], next);
}, },
function (topicData, next) { function (topicData, next) {
postData.cid = topicData.cid;
async.parallel([ async.parallel([
function (next) { function (next) {
updateTopicTimestamp(topicData, next); updateTopicTimestamp(topicData, next);
@ -42,7 +43,7 @@ module.exports = function (Posts) {
], next); ], next);
}, },
function (results, next) { function (results, next) {
plugins.fireHook('action:post.delete', {pid: pid, uid: uid}); plugins.fireHook('action:post.delete', {post: _.clone(postData), uid: uid});
next(null, postData); next(null, postData);
} }
], callback); ], callback);

Loading…
Cancel
Save