]> cat aescling's git repositories - mastodon.git/commitdiff
Use old rules for mention notifications as for mentions timeline
authorEugen Rochko <eugen@zeonfederated.com>
Mon, 21 Nov 2016 09:37:34 +0000 (10:37 +0100)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 21 Nov 2016 09:37:34 +0000 (10:37 +0100)
app/services/notify_service.rb

index a51c5b95946e659446d0c81e9e5eeb31688654fc..c0f1d4c53b5cd3c03d57bcf404f3cc78d8b6f8c8 100644 (file)
@@ -14,10 +14,27 @@ class NotifyService < BaseService
 
   private
 
+  def blocked_mention?
+    FeedManager.instance.filter?(:mentions, @notification.mention.status, @recipient)
+  end
+
+  def blocked_favourite?
+    false
+  end
+
+  def blocked_follow?
+    false
+  end
+
+  def blocked_reblog?
+    false
+  end
+
   def blocked?
-    blocked = false
+    blocked   = false
     blocked ||= @recipient.id == @notification.from_account.id
     blocked ||= @recipient.blocking?(@notification.from_account)
+    blocked ||= send("blocked_#{@notification.type}?")
     blocked
   end