From cf28bbd9fa9088a00f954c59fc8edd11e00c3910 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Wed, 24 Jul 2019 20:00:04 -0500 Subject: clarify rejected announces correctly --- app/helpers/autoreject_helper.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/helpers/autoreject_helper.rb b/app/helpers/autoreject_helper.rb index e924bb217..3ddbad63d 100644 --- a/app/helpers/autoreject_helper.rb +++ b/app/helpers/autoreject_helper.rb @@ -12,7 +12,8 @@ module AutorejectHelper domain = uri.scan(/[\w\-]+\.[\w\-]+(?:\.[\w\-]+)*/).first blocks = DomainBlock.suspend - return :domain if blocks.where(domain: domain).or(blocks.where('domain LIKE ?', "%.#{domain}")).exists? + reason = ((@object && @object['type'] == 'Announce') ? :domain_boosted : :domain) + return reason if blocks.where(domain: domain).or(blocks.where('domain LIKE ?', "%.#{domain}")).exists? return unless @json || @object @@ -60,6 +61,8 @@ module AutorejectHelper case reason when :domain "the origin domain is blocked" + when :domain_boost + "the origin domain of the object being boosted is blocked" when :id_starts_with "the object's URI starts with a blocked phrase" when :id_contains -- cgit