about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-08-20 05:52:54 -0500
committerFire Demon <firedemon@creature.cafe>2020-08-30 05:45:19 -0500
commita921eb4e39390eeec6c49c706aad3630b1d50282 (patch)
tree298ba410ba1019fa361f7d38bf0a8159b17cb8b7 /app/lib
parentd77bce3d82653091feffa7b3884b695afdd9c006 (diff)
[Filtering, Bug] Remove duplicate or unnecessary permission checks, add missing filter_options argument
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/feed_manager.rb3
-rw-r--r--app/lib/status_filter.rb1
2 files changed, 3 insertions, 1 deletions
diff --git a/app/lib/feed_manager.rb b/app/lib/feed_manager.rb
index 12df1ab88..0ae15db9a 100644
--- a/app/lib/feed_manager.rb
+++ b/app/lib/feed_manager.rb
@@ -202,9 +202,10 @@ class FeedManager
 
       statuses = target_account.statuses.published.without_replies.where(visibility: [:public, :unlisted, :private]).includes(:preloadable_poll, reblog: :account).limit(limit)
       crutches = build_crutches(account.id, statuses)
+      filter_options = filter_options_for(account.id)
 
       statuses.each do |status|
-        next if filter_from_home?(status, account.id, crutches)
+        next if filter_from_home?(status, account.id, crutches, filter_options)
 
         add_to_feed(:home, account.id, status, aggregate)
       end
diff --git a/app/lib/status_filter.rb b/app/lib/status_filter.rb
index 7555243c0..eb31dcad6 100644
--- a/app/lib/status_filter.rb
+++ b/app/lib/status_filter.rb
@@ -12,6 +12,7 @@ class StatusFilter
 
   def filtered?
     return false if !account.nil? && account.id == status.account_id
+
     blocked_by_policy? || (account_present? && filtered_status?) || (@filter_silenced && silenced_account?)
   end