diff options
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/feed_manager.rb | 6 | ||||
-rw-r--r-- | app/lib/status_filter.rb | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/app/lib/feed_manager.rb b/app/lib/feed_manager.rb index 6d8f46e6f..b2f040811 100644 --- a/app/lib/feed_manager.rb +++ b/app/lib/feed_manager.rb @@ -157,8 +157,7 @@ class FeedManager def filter_from_home?(status, receiver_id) return false if receiver_id == status.account_id return true if status.reply? && (status.in_reply_to_id.nil? || status.in_reply_to_account_id.nil?) - return true if filtering_thread?(receiver_id, status.conversation_id) - return true if phrase_filtered?(status, receiver_id, :home) + return true if phrase_filtered?(status, receiver_id) check_for_blocks = status.active_mentions.pluck(:account_id) check_for_blocks.concat([status.account_id]) @@ -188,8 +187,7 @@ class FeedManager def filter_from_mentions?(status, receiver_id) return true if receiver_id == status.account_id - return true if filtering_thread?(receiver_id, status.conversation_id) - return true if phrase_filtered?(status, receiver_id, :notifications) + return true if phrase_filtered?(status, receiver_id) # This filter is called from NotifyService, but already after the sender of # the notification has been checked for mute/block. Therefore, it's not diff --git a/app/lib/status_filter.rb b/app/lib/status_filter.rb index d70ed1d21..0cc1ce85c 100644 --- a/app/lib/status_filter.rb +++ b/app/lib/status_filter.rb @@ -23,7 +23,6 @@ class StatusFilter end def filtered_status? - return true if filtering_thread?(account.id, status.conversation_id) blocking_account? || blocking_domain? || muting_account? || filtered_reference? end @@ -34,7 +33,7 @@ class StatusFilter return true if account.user_hides_replies_of_blocker? && reply_to_blocker? # filtered by user? - return true if phrase_filtered?(status, account.id, nil) + return true if phrase_filtered?(status, account.id) # kajiht has no filters if status has no mentions return false if status&.mentions.blank? @@ -46,6 +45,9 @@ class StatusFilter # Don't filter statuses mentioning you. return false if mentioned_account_ids.include?(account.id) + # Filter posts missing media descriptions. + return true if account.filter_undescribed? && 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? return true if mentioned_account_ids.any? do |mentioned_account_id| |