about summary refs log tree commit diff
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-08-06 22:00:53 -0500
committermultiple creatures <dev@multiple-creature.party>2019-08-06 22:00:53 -0500
commit2329043e7b6480f0fa9328a81b769d0cb7121568 (patch)
treef0b30383a0564bda22f099dbba4af3e42d8bd5a0
parentb564aac6f35ea3f5e04a2906b1d8996dc840d910 (diff)
do not parse blocks from `dialup.express` or `tenforward.social` - too much margin-of-error without a machine-readable list
-rw-r--r--app/helpers/blocklist_helper.rb20
1 files changed, 1 insertions, 19 deletions
diff --git a/app/helpers/blocklist_helper.rb b/app/helpers/blocklist_helper.rb
index 7437ccf37..9a9451d25 100644
--- a/app/helpers/blocklist_helper.rb
+++ b/app/helpers/blocklist_helper.rb
@@ -5,7 +5,7 @@ module BlocklistHelper
   def merged_blocklist
     # ordered by preference
     # prefer vulpine b/c they have easy-to-parse reason text
-    blocklist = vulpine_club_blocks | dialup_express_blocks | ten_forward_blocks | fediverse_space_blocks
+    blocklist = vulpine_club_blocks | fediverse_space_blocks
     blocklist.uniq { |entry| entry[:domain] }
   end
 
@@ -15,24 +15,6 @@ module BlocklistHelper
     end
   end
 
-  def dialup_express_blocks
-    admin_id = Account.find_remote('xenon', 'sleeping.town')&.id
-    return [] if admin_id.nil?
-
-    domains = ActiveRecord::Base.connection.select_values("SELECT unnest(regexp_matches(text, '\\m[\\w\\-]+\\.[\\w\-]+(?:\\.[\\w\\-]+)*', 'g')) FROM statuses WHERE account_id = #{admin_id.to_i} AND NOT reply AND created_at >= (NOW() - INTERVAL '2 days') AND tsv @@ to_tsquery('new <-> dialup <-> express <2> block') EXCEPT SELECT domain FROM domain_blocks")
-
-    domain_map(domains, "Imported from <https://dialup.express>.")
-  end
-
-  def ten_forward_blocks
-    admin_id = Account.find_remote('guinan', 'tenforward.social')&.id
-    return [] if admin_id.nil?
-
-    domains = ActiveRecord::Base.connection.select_values("SELECT unnest(regexp_matches(text, '\\m[\\w\\-]+\\.[\\w\-]+(?:\\.[\\w\\-]+)*', 'g')) FROM statuses WHERE account_id = #{admin_id.to_i} AND NOT reply AND created_at >= (NOW() - INTERVAL '2 days') AND tsv @@ to_tsquery('ten <-> forward <-> moderation <-> announcement') EXCEPT SELECT domain FROM domain_blocks")
-
-    domain_map(domains, "Imported from <https://ten.forward>.")
-  end
-
   def vulpine_club_blocks
     body = Request.new(:get, VULPINE_CLUB_URL).perform do |response|
       response.code != 200 ? nil : response.body_with_limit(66.kilobytes)