about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-10-03 17:11:54 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-10-03 17:12:13 +0200
commit9d59d7b463e7f31ceedf27775a7ee3e8e071b4a1 (patch)
tree6623a9795e3b6fc755b11caa132211f56acfed32 /app/lib
parenta488b05726b2e93b5f66e93ef700a6bc32a3a029 (diff)
Adding a block model and filter mentions from blocked users (fix #60)
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/feed_manager.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/lib/feed_manager.rb b/app/lib/feed_manager.rb
index 779a31f0b..58d6a005c 100644
--- a/app/lib/feed_manager.rb
+++ b/app/lib/feed_manager.rb
@@ -40,13 +40,13 @@ class FeedManager
   end
 
   # Filter status out of the home feed if it is a reply to someone the user doesn't follow
-  def filter_from_home?(status, follower)
+  def filter_from_home?(status, receiver)
     replied_to_user = status.reply? ? status.thread.account : nil
-    (status.reply? && !(follower.id == replied_to_user.id || replied_to_user.id == status.account_id || follower.following?(replied_to_user)))
+    (status.reply? && !(receiver.id == replied_to_user.id || replied_to_user.id == status.account_id || receiver.following?(replied_to_user)))
   end
 
-  def filter_from_mentions?(status, follower)
-    false
+  def filter_from_mentions?(status, receiver)
+    receiver.blocking?(status.account) || (status.reblog? && receiver.blocking?(status.reblog.account))
   end
 
   def inline_render(target_account, status)