breaking: removal of filter:post.purge

This commit is contained in:
Julian Lam
2023-12-04 14:02:31 -05:00
parent 9d8061eab9
commit c84b72fb37
2 changed files with 0 additions and 19 deletions

View File

@@ -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',

View File

@@ -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),