diff --git a/utilities/check-spam.js b/utilities/check-spam.js index b078f89..2e6b1cf 100644 --- a/utilities/check-spam.js +++ b/utilities/check-spam.js @@ -9,6 +9,7 @@ const akismetClient = akismet.client({ exports.checkSpam = (comment, ip)=> { if (process.env.AKISMET_KEY === 'MANUAL_REVIEW') { console.log('已使用人工审核模式,评论审核后才会发表~'); + comment.setACL(new AV.ACL({"*":{"read":false}})); comment.set('isSpam', true); comment.save(); return; @@ -39,6 +40,7 @@ exports.checkSpam = (comment, ip)=> { // comment.destroy(); } else { comment.set('isSpam', false); + comment.setACL(new AV.ACL({"*":{"read":true}})); comment.save(); console.log('垃圾评论检测完成,放行~'); }