about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--app/lib/status_filter.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/lib/status_filter.rb b/app/lib/status_filter.rb
index 6d65e2c00..80254ffb4 100644
--- a/app/lib/status_filter.rb
+++ b/app/lib/status_filter.rb
@@ -13,13 +13,15 @@ class StatusFilter
   end
 
   def filtered?
-    return true if status.nil?
-    return false if !account.nil? && account.id == status.account_id || account.nil?
+    return true if status.nil? || blocked_by_policy?
+    return false if account.nil? || account.id == status.account_id
     return true if redis.sismember("filtered_statuses:#{account.id}", status.id)
-    if blocked_by_policy? || (account_present? && filtered_status?) || silenced_account?
+
+    if filtered_status? || silenced_account?
       redis.sadd("filtered_statuses:#{account.id}", status.id)
       return true
     end
+
     false
   end