diff options
-rw-r--r-- | app/lib/status_filter.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/lib/status_filter.rb b/app/lib/status_filter.rb index 0cc1ce85c..f4053947b 100644 --- a/app/lib/status_filter.rb +++ b/app/lib/status_filter.rb @@ -2,6 +2,7 @@ class StatusFilter include FilterHelper + include Redisable attr_reader :status, :account @@ -12,8 +13,13 @@ class StatusFilter end def filtered? + return true if redis.sismember("filtered_statuses:#{@account.id}", @status.id) return false if !account.nil? && account.id == status.account_id - return true if blocked_by_policy? || (account_present? && filtered_status?) || silenced_account? + if blocked_by_policy? || (account_present? && filtered_status?) || silenced_account? + redis.sadd("filtered_statuses:#{@account.id}", @status.id) + return true + end + false end private |