diff options
author | multiple creatures <dev@multiple-creature.party> | 2020-01-17 14:29:24 -0600 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2020-01-17 14:29:24 -0600 |
commit | f083ab1a272e8a0b77965aa430ae293f914cde95 (patch) | |
tree | b89c39482529efcb0f9fe862f80aee9ea640f3be | |
parent | b93a9a126bc39f2996129e90e4e376cb8bf6dfb5 (diff) |
make sure there are actually media attachments before trying to match againist the `filter_undescribed?` setting
-rw-r--r-- | app/lib/status_filter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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? |