Node.js based forum software built for the modern web
fire hooks for flag update
Julian Lam6c04e393b523
diff --git a/src/flags.js b/src/flags.jsindex 168eb5a11e..dd7b038b92 100644--- a/src/flags.js+++ b/src/flags.js@@ -470,9 +470,13 @@ Flags.update = function (flagId, uid, changeset, callback) {// Save new object to db (upsert)tasks.push(async.apply(db.setObject, 'flag:' + flagId, changeset));+// Append historytasks.push(async.apply(Flags.appendHistory, flagId, uid, changeset));+ // Fire plugin hook+ tasks.push(async.apply(plugins.fireHook, 'action:flag.update', { changeset: changeset, uid: uid }));+async.parallel(tasks, function (err, data) {return next(err);});