about summary refs log tree commit diff
path: root/app/helpers
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-10-09 20:01:45 -0500
committermultiple creatures <dev@multiple-creature.party>2019-10-09 20:01:45 -0500
commita9a13421269650b0600008d74ab7c97f386e5618 (patch)
tree79c0c9ac51e376a219042e49f692b9c5bb32adda /app/helpers
parent999ac0672355fe7aa6f57563097a173ed20b99d9 (diff)
custom filters can now also match posts with missing media descriptions
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/filter_helper.rb1
1 files changed, 1 insertions, 0 deletions
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?