deprecating old hook for #5232

This commit is contained in:
Julian Lam
2016-12-07 13:06:55 -05:00
parent 5dd892bd01
commit a5fb4825b4
3 changed files with 9 additions and 3 deletions

View File

@@ -597,7 +597,9 @@ Flags.notify = function (flagObj, uid, callback) {
return callback(err);
}
plugins.fireHook('action:post.flag', {post: results.post, reason: flagObj.description, flaggingUser: flagObj.reporter});
plugins.fireHook('action:flag.create', {
flag: flagObj
});
notifications.push(notification, results.admins.concat(results.moderators).concat(results.globalMods), callback);
});
});
@@ -624,6 +626,9 @@ Flags.notify = function (flagObj, uid, callback) {
return callback(err);
}
plugins.fireHook('action:flag.create', {
flag: flagObj
});
notifications.push(notification, results.admins.concat(results.globalMods), callback);
});
});