about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authorDavid Yip <yipdw@member.fsf.org>2017-10-14 02:28:20 -0500
committerDavid Yip <yipdw@member.fsf.org>2017-10-21 14:54:21 -0500
commit4745d6eeca3a422f41775ee5f31989fc036da7d6 (patch)
tree4c04ca2eca3f03d20d51374d2c37b12f8bb6962a /app/lib
parent9093e2de7a133470eec1049a13465f81928d0119 (diff)
Spec out KeywordMute interface. #164.
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/feed_manager.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/lib/feed_manager.rb b/app/lib/feed_manager.rb
index ca15745cb..baaa09e86 100644
--- a/app/lib/feed_manager.rb
+++ b/app/lib/feed_manager.rb
@@ -138,6 +138,8 @@ class FeedManager
   end
 
   def filter_from_home?(status, receiver_id)
+    return true if KeywordMute.where(account_id: receiver_id).matches?(status.text)
+
     return false if receiver_id == status.account_id
     return true  if status.reply? && (status.in_reply_to_id.nil? || status.in_reply_to_account_id.nil?)