Node.js based forum software built for the modern web
deprecating old hook for #5232
Julian Lama5fb4825b4c9
diff --git a/public/language/en-GB/pages.json b/public/language/en-GB/pages.jsonindex 801b28edea..104e2249f2 100644--- a/public/language/en-GB/pages.json+++ b/public/language/en-GB/pages.json@@ -6,7 +6,7 @@"popular-month": "Popular topics this month","popular-alltime": "All time popular topics","recent": "Recent Topics",- "flagged-posts": "Flagged Posts",+ "flagged-content": "Flagged Content","ip-blacklist": "IP Blacklist","users/online": "Online Users",diff --git a/src/flags.js b/src/flags.jsindex 9f121f81bf..bfbe80992a 100644--- a/src/flags.js+++ b/src/flags.js@@ -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);});});diff --git a/src/plugins/hooks.js b/src/plugins/hooks.jsindex b8e5af0e46..b5a32ba1b7 100644--- a/src/plugins/hooks.js+++ b/src/plugins/hooks.js@@ -7,7 +7,8 @@ module.exports = function (Plugins) {Plugins.deprecatedHooks = {'filter:user.custom_fields': null, // remove in v1.1.0'filter:post.save': 'filter:post.create',- 'filter:user.profileLinks': 'filter:user.profileMenu'+ 'filter:user.profileLinks': 'filter:user.profileMenu',+ 'action:post.flag': 'action:flag.create'};/*`data` is an object consisting of (* is required):