diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-08-12 22:33:12 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-08-30 05:45:17 -0500 |
commit | e76a34ee42763fbf0d0252e54002ebe5fcb4b92c (patch) | |
tree | c1a968df4c99e7b67dce31e093cc0f4c821e6ff4 /app/lib | |
parent | 57b3aa056b792cff4b1c9294323f9c07528a82e1 (diff) |
[Moderation] Limit scope of admin-level silences to timelines, search, and accounts not following or followed by the user
Diffstat (limited to 'app/lib')
-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 725031a7f..7555243c0 100644 --- a/app/lib/status_filter.rb +++ b/app/lib/status_filter.rb @@ -3,15 +3,16 @@ class StatusFilter attr_reader :status, :account - def initialize(status, account, preloaded_relations = {}) + def initialize(status, account, filter_silenced, preloaded_relations = {}) @status = status @account = account @preloaded_relations = preloaded_relations + @filter_silenced = filter_silenced end def filtered? return false if !account.nil? && account.id == status.account_id - blocked_by_policy? || (account_present? && filtered_status?) || silenced_account? + blocked_by_policy? || (account_present? && filtered_status?) || (@filter_silenced && silenced_account?) end private |