breaking: removal of filter:post.purge

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

View File

@@ -8,11 +8,6 @@ const als = require('../als');
const Hooks = module.exports;
Hooks._deprecated = new Map([
['action:post.purge', {
new: 'action:posts.purge',
since: 'v1.19.6',
until: 'v2.1.0',
}],
['filter:user.verify.code', {
new: 'filter:user.verify',
since: 'v2.2.0',

View File

@@ -86,10 +86,6 @@ module.exports = function (Posts) {
await resolveFlags(postData, uid);
// deprecated hook
Promise.all(postData.map(p => plugins.hooks.fire('action:post.purge', { post: p, uid: uid })));
// new hook
plugins.hooks.fire('action:posts.purge', { posts: postData, uid: uid });
await db.deleteAll(postData.map(p => `post:${p.pid}`));