From f083ab1a272e8a0b77965aa430ae293f914cde95 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Fri, 17 Jan 2020 14:29:24 -0600 Subject: make sure there are actually media attachments before trying to match againist the `filter_undescribed?` setting --- app/lib/status_filter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/status_filter.rb b/app/lib/status_filter.rb index b973bdf42..e6c6a39e5 100644 --- a/app/lib/status_filter.rb +++ b/app/lib/status_filter.rb @@ -59,7 +59,7 @@ class StatusFilter return false if mentioned_account_ids.include?(account.id) # Filter posts missing media descriptions. - return true if account.user.filter_undescribed? && status.media_attachments.all? { |attachment| attachment.description.blank? } + return true if account.user.filter_undescribed? && status.media_attachments.present? && status.media_attachments.all? { |attachment| attachment.description.blank? } return true if account.user_hides_mentions_of_blocked? && mentioned_accounts.where.not(suspended_at: nil).exists? -- cgit