about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/glitch/keyword_mute.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/glitch/keyword_mute.rb b/app/models/glitch/keyword_mute.rb
index 3b0b47f52..823e252d3 100644
--- a/app/models/glitch/keyword_mute.rb
+++ b/app/models/glitch/keyword_mute.rb
@@ -45,5 +45,9 @@ class Glitch::KeywordMute < ApplicationRecord
     def =~(str)
       regex ? regex =~ str : false
     end
+
+    def matches?(str)
+      !!(regex =~ str)
+    end
   end
 end