mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 11:35:55 +01:00
deprecating old hook for #5232
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
"popular-month": "Popular topics this month",
|
"popular-month": "Popular topics this month",
|
||||||
"popular-alltime": "All time popular topics",
|
"popular-alltime": "All time popular topics",
|
||||||
"recent": "Recent Topics",
|
"recent": "Recent Topics",
|
||||||
"flagged-posts": "Flagged Posts",
|
"flagged-content": "Flagged Content",
|
||||||
"ip-blacklist": "IP Blacklist",
|
"ip-blacklist": "IP Blacklist",
|
||||||
|
|
||||||
"users/online": "Online Users",
|
"users/online": "Online Users",
|
||||||
|
|||||||
@@ -597,7 +597,9 @@ Flags.notify = function (flagObj, uid, callback) {
|
|||||||
return callback(err);
|
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);
|
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);
|
return callback(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
plugins.fireHook('action:flag.create', {
|
||||||
|
flag: flagObj
|
||||||
|
});
|
||||||
notifications.push(notification, results.admins.concat(results.globalMods), callback);
|
notifications.push(notification, results.admins.concat(results.globalMods), callback);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -7,7 +7,8 @@ module.exports = function (Plugins) {
|
|||||||
Plugins.deprecatedHooks = {
|
Plugins.deprecatedHooks = {
|
||||||
'filter:user.custom_fields': null, // remove in v1.1.0
|
'filter:user.custom_fields': null, // remove in v1.1.0
|
||||||
'filter:post.save': 'filter:post.create',
|
'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):
|
`data` is an object consisting of (* is required):
|
||||||
|
|||||||
Reference in New Issue
Block a user