Skip to content

OpenSourcePolitics/decidim-module-decidim_ai_spam_bot

Repository files navigation

Decidim::DecidimAiSpamBot

Automated spam moderation module for Decidim. Blocks spam users and hides spam resources based on AI detection (decidim-ai) and manual reports.

Usage

DecidimAiSpamBot will be available as a Component for a Participatory Space.

Features

  • Automatic blocking of users flagged as spam (AI or manual reports)
  • Automatic hiding of spam resources (proposals, comments, debates...)
  • Nightly scheduled job via Sidekiq-cron
  • Full traceability (PaperTrail + action logs)
  • Anti-regression: If an admin manually unblocks a user or unhides a resource, the job will not re-block or re-hide them on the next run. This is handled by checking decidim_action_logs for unblock and unhide actions before processing.

Installation

Add this line to your application's Gemfile:

gem "decidim-decidim_ai_spam_bot"

And then execute:

bundle

Configuration

Sidekiq

Add the scheduler configuration to your config/sidekiq.yml. See config/sidekiq.yml.example for the recommended configuration.

Rake task (manual run)

bundle exec rake decidim_ai_spam_bot:block_spam_job

Requirements

  • decidim-ai must be installed and configured, , including DECIDIM_AI_REPORTING_USER_EMAIL.

Contributing

Contributions are welcome !

We expect the contributions to follow the Decidim's contribution guide.

Security

Security is very important to us. If you have any issue regarding security, please disclose the information responsibly by sending an email to security [at] opensourcepolitics [dot] eu and not by creating a GitHub issue.

License

This engine is distributed under the GNU AFFERO GENERAL PUBLIC LICENSE.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages