mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 09:06:15 +01:00
breaking: removal of filter:post.purge
This commit is contained in:
@@ -8,11 +8,6 @@ const als = require('../als');
|
|||||||
const Hooks = module.exports;
|
const Hooks = module.exports;
|
||||||
|
|
||||||
Hooks._deprecated = new Map([
|
Hooks._deprecated = new Map([
|
||||||
['action:post.purge', {
|
|
||||||
new: 'action:posts.purge',
|
|
||||||
since: 'v1.19.6',
|
|
||||||
until: 'v2.1.0',
|
|
||||||
}],
|
|
||||||
['filter:user.verify.code', {
|
['filter:user.verify.code', {
|
||||||
new: 'filter:user.verify',
|
new: 'filter:user.verify',
|
||||||
since: 'v2.2.0',
|
since: 'v2.2.0',
|
||||||
|
|||||||
@@ -86,10 +86,6 @@ module.exports = function (Posts) {
|
|||||||
|
|
||||||
await resolveFlags(postData, uid);
|
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 });
|
plugins.hooks.fire('action:posts.purge', { posts: postData, uid: uid });
|
||||||
|
|
||||||
await db.deleteAll(postData.map(p => `post:${p.pid}`));
|
await db.deleteAll(postData.map(p => `post:${p.pid}`));
|
||||||
|
|||||||
Reference in New Issue
Block a user