Skip to content

Node.js based forum software built for the modern web

Add hooks: action:post.favourite and action:post.unfavourite

Andrea Cardinale1d22a2d46b73
diff --git a/src/favourites.js b/src/favourites.js
index e38e11298e..58a945e211 100644
--- a/src/favourites.js
+++ b/src/favourites.js
@@ -307,6 +307,12 @@ var async = require('async'),
results.postData.reputation = count;
posts.setPostField(pid, 'reputation', count, next);
},
+ function(next) {
+ plugins.fireHook('action:post.' + type, {
+ pid: pid,
+ uid: uid,
+ }, next);
+ },
function(next) {
next(null, {
post: results.postData,