From a96d89ac567cbb9e0631682f3b78a26bcf5a9ba9 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Sat, 3 Aug 2019 05:41:38 -0500 Subject: fix 6 am typo - `+=` -> `=` --- app/helpers/blocklist_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/helpers/blocklist_helper.rb b/app/helpers/blocklist_helper.rb index 5730a2ef5..f916579ec 100644 --- a/app/helpers/blocklist_helper.rb +++ b/app/helpers/blocklist_helper.rb @@ -21,7 +21,7 @@ module BlocklistHelper 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") + 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") domains.map! do |domain| {domain: domain, severity: :suspend, reason: '(imported from ten.forward)'} -- cgit