From a69e450eb7d581eaf5f2aa5aa901d7f90e5c6b18 Mon Sep 17 00:00:00 2001 From: Quentin Champenois Date: Thu, 17 Oct 2024 16:18:27 +0200 Subject: [PATCH] refactor: Call method --- app/jobs/decidim/spam_detection/block_users_job.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/jobs/decidim/spam_detection/block_users_job.rb b/app/jobs/decidim/spam_detection/block_users_job.rb index 74bd1d1..ee8191f 100644 --- a/app/jobs/decidim/spam_detection/block_users_job.rb +++ b/app/jobs/decidim/spam_detection/block_users_job.rb @@ -10,7 +10,7 @@ def perform users = reported_spams_users Rails.logger.info "Blocking users marked as spam: #{users.count} users found" users.find_each do |user| - Decidim::SpamDetection::BlockSpamUserCommand.call(user, Decidim::SpamDetection::SpamUserCommandAdapter::SPAM_LEVEL[:very_sure]).call + Decidim::SpamDetection::BlockSpamUserCommand.call(user, spam_level).call end Rails.logger.info "Terminated..." end