• Resolved freeko92

    (@freeko92)


    We are trying to develop spam comment processing logic through Akismet’s checkSpam, but regardless of what content is in the comment, always returning ‘false’. What am I missing?

    Below is the code I wrote to test.

    const comment = {
        ip: '192.0.96.247',
        useragent: 'CommentorsAgent 1.0 WebKit',
        content: "Nice",
        email: 'test050505@test.com',
        name: 'test'
    }
    
    async function checkSpamComment(comment) {
    
        try {
    
            const isSpam = await client.checkSpam(comment)
    
            if (isSpam) console.log('OMG Spam!')
    
            else console.log('Totally not spam')
    
        } catch (err) {
    
            console.error('Something went wrong:', err.message)
    
        }
    
    }
    
    checkSpamComment();
    
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘I don’t think Akismet’s checkSpam is working properly’ is closed to new replies.