about summary refs log tree commit diff
path: root/app/workers/scheduler/janitor_scheduler.rb
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-11-16 05:41:17 -0600
committermultiple creatures <dev@multiple-creature.party>2019-11-16 05:41:17 -0600
commitb462b46a809b512286473bc25f666d1a12556a88 (patch)
treee07bbfcf6d822aef11c66c7ba5965ebb39260f57 /app/workers/scheduler/janitor_scheduler.rb
parentd13e73d498695421d6ff9e03e7a9ecd06797327b (diff)
The WAS spammer detection is no longer needed; removing this code from the Janitor.
Diffstat (limited to 'app/workers/scheduler/janitor_scheduler.rb')
-rw-r--r--app/workers/scheduler/janitor_scheduler.rb31
1 files changed, 0 insertions, 31 deletions
diff --git a/app/workers/scheduler/janitor_scheduler.rb b/app/workers/scheduler/janitor_scheduler.rb
index 7cba586a7..3d0e8e77c 100644
--- a/app/workers/scheduler/janitor_scheduler.rb
+++ b/app/workers/scheduler/janitor_scheduler.rb
@@ -20,7 +20,6 @@ class Scheduler::JanitorScheduler
 
     prune_deleted_accounts!
     suspend_abandoned_accounts!
-    suspend_spammers!
     silence_markov!
     import_blocklists!
     export_suspensions!
@@ -40,13 +39,6 @@ class Scheduler::JanitorScheduler
     end
   end
 
-  def suspend_spammers!
-    reason = 'Appears to be a spammer account.'
-    spammer_accounts.find_each do |spammer|
-      account_policy(spammer.username, spammer.domain, :suspend, reason)
-    end
-  end
-
   def silence_markov!
     reason = 'Appears to be a markov bot.'
     markov_accounts.find_each do |markov|
@@ -96,12 +88,6 @@ class Scheduler::JanitorScheduler
   end
 
 
-  def spammer_accounts
-    spammer_ids = spammer_account_ids
-    Account.reorder(nil).where(id: spammer_ids, suspended_at: nil)
-      .where.not(id: @exclude_ids)
-  end
-
   def markov_accounts
     Account.reorder(nil).where(silenced_at: nil).where.not(id: @exclude_markov)
       .where('username LIKE ? OR note ILIKE ?', '%ebooks%', '%markov%')
@@ -134,10 +120,6 @@ class Scheduler::JanitorScheduler
     local_account_ids | outgoing_follow_ids | excluded_accounts_from_env('USERNAMES')
   end
 
-  def spammer_account_ids
-    post_spammer_ids | card_spammer_ids
-  end
-
   def existing_policy_domains
     DomainBlock.all.pluck(:domain)
   end
@@ -154,19 +136,6 @@ class Scheduler::JanitorScheduler
     Account.local.reorder(nil).flat_map { |account| account.following_ids }
   end
 
-  def post_spammer_ids
-    Status.with_public_visibility
-      .reorder(nil)
-      .where('tsv @@ to_tsquery(?)', 'womenarestupid.site & /blog/:*')
-      .pluck(:account_id)
-  end
-
-  def card_spammer_ids
-    PreviewCard.where('url LIKE ? OR title ILIKE ?', '%womenarestupid%', '%womenaredumb%')
-      .reorder(nil)
-      .flat_map { |card| card.statuses.pluck(:account_id) }
-  end
-
 
   def excluded_accounts_from_env(suffix)
     excluded_usernames = ENV.fetch("JANITOR_EXCLUDE_#{suffix.upcase}", '').split