Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add Spam bot rake task #108

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading