about summary refs log tree commit diff
path: root/app/models/glitch/keyword_mute_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/glitch/keyword_mute_helper.rb')
-rw-r--r--app/models/glitch/keyword_mute_helper.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/models/glitch/keyword_mute_helper.rb b/app/models/glitch/keyword_mute_helper.rb
index 6d067947f..955c3b1f3 100644
--- a/app/models/glitch/keyword_mute_helper.rb
+++ b/app/models/glitch/keyword_mute_helper.rb
@@ -9,16 +9,16 @@ class Glitch::KeywordMuteHelper
     @tag_matcher    = Glitch::KeywordMute.tag_matcher_for(receiver_id)
   end
 
-  def matches?(status)
-    matchers_match?(status) || (status.reblog? && matchers_match?(status.reblog))
+  def matches?(status, scope)
+    matchers_match?(status, scope) || (status.reblog? && matchers_match?(status.reblog, scope))
   end
 
   private
 
-  def matchers_match?(status)
-    text_matcher.matches?(prepare_text(status.text)) ||
-      text_matcher.matches?(prepare_text(status.spoiler_text)) ||
-      tag_matcher.matches?(status.tags)
+  def matchers_match?(status, scope)
+    text_matcher.matches?(prepare_text(status.text), scope) ||
+      text_matcher.matches?(prepare_text(status.spoiler_text), scope) ||
+      tag_matcher.matches?(status.tags, scope)
   end
 
   def prepare_text(text)