Skip to content

Commit

Permalink
fix: Add spam bot rake task to block users
Browse files Browse the repository at this point in the history
fix: Add Spam bot rake task
  • Loading branch information
Quentinchampenois authored Oct 22, 2024
2 parents d179a43 + c4e27e7 commit d633e07
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ gem "decidim-friendly_signup", git: "https://github.com/OpenSourcePolitics/decid
gem "decidim-homepage_interactive_map", git: "https://github.com/OpenSourcePolitics/decidim-module-homepage_interactive_map.git", branch: DECIDIM_BRANCH
gem "decidim-simple_proposal", git: "https://github.com/opensourcepolitics/decidim-module-simple_proposal.git", branch: DECIDIM_BRANCH
gem "decidim-slider", git: "https://github.com/OpenSourcePolitics/decidim-module-slider", branch: "rc/0.27"
gem "decidim-spam_detection", "4.0.0"
gem "decidim-spam_detection", git: "https://github.com/OpenSourcePolitics/decidim-spam_detection.git", tag: "4.1.0"
gem "decidim-term_customizer", git: "https://github.com/opensourcepolitics/decidim-module-term_customizer.git", branch: "fix/multi-threading-compliant"

# Omniauth gems
Expand Down
16 changes: 10 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ GIT
decidim-slider (0.0.3)
decidim-core (~> 0.27.0)

GIT
remote: https://github.com/OpenSourcePolitics/decidim-spam_detection.git
revision: 52623c57f571716730532eab8757560818f7f1df
tag: 4.1.0
specs:
decidim-spam_detection (4.1.0)
decidim-core (~> 0.27.0)

GIT
remote: https://github.com/OpenSourcePolitics/omniauth-publik
revision: ab703a565c402b773ce0025593554b329f603e5c
Expand Down Expand Up @@ -453,8 +461,6 @@ GEM
decidim-comments (= 0.27.5)
decidim-core (= 0.27.5)
decidim-proposals (= 0.27.5)
decidim-spam_detection (4.0.0)
decidim-core (~> 0.27.0)
decidim-surveys (0.27.5)
decidim-core (= 0.27.5)
decidim-forms (= 0.27.5)
Expand Down Expand Up @@ -536,8 +542,6 @@ GEM
faraday-net_http (3.1.0)
net-http
ffi (1.17.0)
ffi (1.17.0-arm64-darwin)
ffi (1.17.0-x86_64-darwin)
file_validators (3.0.0)
activemodel (>= 3.2)
mime-types (>= 1.0)
Expand Down Expand Up @@ -1047,7 +1051,7 @@ DEPENDENCIES
decidim-homepage_interactive_map!
decidim-simple_proposal!
decidim-slider!
decidim-spam_detection (= 4.0.0)
decidim-spam_detection!
decidim-term_customizer!
dotenv-rails
faker (~> 2.14)
Expand Down Expand Up @@ -1081,4 +1085,4 @@ RUBY VERSION
ruby 3.0.6p216

BUNDLED WITH
2.5.10
2.4.6
5 changes: 5 additions & 0 deletions config/sidekiq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,8 @@
class: NotificationsDigestMailJob
queue: mailers
args: :weekly
SpamBotBlockUsers:
cron: '0 <%= Random.rand(0..59) %> <%= Random.rand(6..8) %> * * *' # Run randomly between 06:00 and 08:59
class: Decidim::SpamDetection::BlockUsersJob
queue: default
enabled: false

0 comments on commit d633e07

Please sign in to comment.