about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorDavid Yip <yipdw@member.fsf.org>2017-11-06 16:48:36 -0600
committerDavid Yip <yipdw@member.fsf.org>2017-11-15 18:12:26 -0600
commit431503bae2dc6e12bdade7d5d20f707112c2f7c2 (patch)
tree1ada326f06042dba0c2cbb811ea814abfa59bc2b /app
parent04508868b07f5631eddda3e4d8240dde9b751fd4 (diff)
Also run the keyword matcher on a status' tags. #208.
Diffstat (limited to 'app')
-rw-r--r--app/lib/feed_manager.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/lib/feed_manager.rb b/app/lib/feed_manager.rb
index 3b16b5d52..414632a8a 100644
--- a/app/lib/feed_manager.rb
+++ b/app/lib/feed_manager.rb
@@ -173,10 +173,14 @@ class FeedManager
   def keyword_filter?(status, matcher)
     should_filter   = matcher =~ status.text
     should_filter ||= matcher =~ status.spoiler_text
+    should_filter ||= status.tags.find_each.any? { |t| matcher =~ t.name }
 
     if status.reblog?
-      should_filter ||= matcher =~ status.reblog.text
-      should_filter ||= matcher =~ status.reblog.spoiler_text
+      reblog = status.reblog
+
+      should_filter ||= matcher =~ reblog.text
+      should_filter ||= matcher =~ reblog.spoiler_text
+      should_filter ||= reblog.tags.find_each.any? { |t| matcher =~ t.name }
     end
 
     !!should_filter