mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
breaking: removal of filter:post.purge
This commit is contained in:
@@ -8,21 +8,6 @@ const als = require('../als');
|
|||||||
const Hooks = module.exports;
|
const Hooks = module.exports;
|
||||||
|
|
||||||
Hooks._deprecated = new Map([
|
Hooks._deprecated = new Map([
|
||||||
['filter:email.send', {
|
|
||||||
new: 'static:email.send',
|
|
||||||
since: 'v1.17.0',
|
|
||||||
until: 'v2.0.0',
|
|
||||||
}],
|
|
||||||
['filter:router.page', {
|
|
||||||
new: 'response:router.page',
|
|
||||||
since: 'v1.15.3',
|
|
||||||
until: 'v2.1.0',
|
|
||||||
}],
|
|
||||||
['filter:post.purge', {
|
|
||||||
new: 'filter:posts.purge',
|
|
||||||
since: 'v1.19.6',
|
|
||||||
until: 'v2.1.0',
|
|
||||||
}],
|
|
||||||
['action:post.purge', {
|
['action:post.purge', {
|
||||||
new: 'action:posts.purge',
|
new: 'action:posts.purge',
|
||||||
since: 'v1.19.6',
|
since: 'v1.19.6',
|
||||||
|
|||||||
@@ -63,10 +63,6 @@ module.exports = function (Posts) {
|
|||||||
p.cid = tidToTopic[p.tid] && tidToTopic[p.tid].cid;
|
p.cid = tidToTopic[p.tid] && tidToTopic[p.tid].cid;
|
||||||
});
|
});
|
||||||
|
|
||||||
// deprecated hook
|
|
||||||
await Promise.all(postData.map(p => plugins.hooks.fire('filter:post.purge', { post: p, pid: p.pid, uid: uid })));
|
|
||||||
|
|
||||||
// new hook
|
|
||||||
await plugins.hooks.fire('filter:posts.purge', {
|
await plugins.hooks.fire('filter:posts.purge', {
|
||||||
posts: postData,
|
posts: postData,
|
||||||
pids: postData.map(p => p.pid),
|
pids: postData.map(p => p.pid),
|
||||||
|
|||||||
Reference in New Issue
Block a user