From a9a13421269650b0600008d74ab7c97f386e5618 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Wed, 9 Oct 2019 20:01:45 -0500 Subject: custom filters can now also match posts with missing media descriptions --- app/helpers/filter_helper.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'app/helpers') diff --git a/app/helpers/filter_helper.rb b/app/helpers/filter_helper.rb index 3e3b4b748..a4a86496f 100644 --- a/app/helpers/filter_helper.rb +++ b/app/helpers/filter_helper.rb @@ -41,6 +41,7 @@ module FilterHelper matched ||= regex.match(spoiler_text).present? if filter.spoiler && spoiler_text.present? matched ||= regex.match(tags).present? if filter.tags && tags.present? matched ||= regex.match(descs).present? if filter.desc && descs.present? + matched ||= status.media_attachments.all { |a| a.description.blank? } if filter.no_desc && status.media_attachments.any? if matched filter_thread(receiver_id, status.conversation_id) if filter.thread && filter.custom_cw.blank? -- cgit