about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-03-02 18:50:33 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-03-02 18:50:33 +0100
commit4c0e9f85c5c9e3be91f9a76139fab3b55abbf363 (patch)
tree9d60c6b37a6adb60b20a674630587de4e55d8765 /app/lib
parent89fc2d7f4810ecdf66b17543f4603c1089a0c3f5 (diff)
parentc64a1c25c4e9a07c694863a38334ed66e368752e (diff)
Merge branch 'KitRedgrave-add-mute-button'
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/feed_manager.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/lib/feed_manager.rb b/app/lib/feed_manager.rb
index 016ef0235..3a26c5c05 100644
--- a/app/lib/feed_manager.rb
+++ b/app/lib/feed_manager.rb
@@ -95,6 +95,8 @@ class FeedManager
   end
 
   def filter_from_home?(status, receiver)
+    return true if receiver.muting?(status.account)
+
     should_filter = false
 
     if status.reply? && status.in_reply_to_id.nil?
@@ -105,6 +107,7 @@ class FeedManager
       should_filter &&= !(status.account_id == status.in_reply_to_account_id) # and it's not a self-reply
     elsif status.reblog?                                                      # Filter out a reblog
       should_filter = receiver.blocking?(status.reblog.account)               # if I'm blocking the reblogged person
+      should_filter ||= receiver.muting?(status.reblog.account)               # or muting that person
     end
 
     should_filter ||= receiver.blocking?(status.mentions.map(&:account_id))   # or if it mentions someone I blocked