mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-05 20:11:26 +01:00
Added action:post.downvote hook
This commit is contained in:
@@ -131,7 +131,14 @@ var async = require('async'),
|
||||
return callback(new Error('[[error:not-enough-reputation-to-downvote]]'));
|
||||
}
|
||||
|
||||
toggleVote('downvote', pid, uid, callback);
|
||||
toggleVote('downvote', pid, uid, function(err, votes) {
|
||||
if (err) return callback(err);
|
||||
plugins.fireHook('action:post.downvote', {
|
||||
pid: pid,
|
||||
uid: uid
|
||||
});
|
||||
callback(null, votes);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user