diff options
-rw-r--r-- | app/lib/status_filter.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/lib/status_filter.rb b/app/lib/status_filter.rb index f4053947b..81faf129f 100644 --- a/app/lib/status_filter.rb +++ b/app/lib/status_filter.rb @@ -13,10 +13,11 @@ class StatusFilter end def filtered? - return true if redis.sismember("filtered_statuses:#{@account.id}", @status.id) + return true if status.nil? || account.nil? 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? - redis.sadd("filtered_statuses:#{@account.id}", @status.id) + redis.sadd("filtered_statuses:#{account.id}", status.id) return true end false |