forked from treehouse/mastodon
KeywordMute matcher: more closely mimic Regexp#=~ behavior.
Regexp#=~ returns nil if it does not match. An empty mute set does not match any status, so KeywordMute::Matcher#=~ ought to return nil also.rebase/4.0.0rc2
parent
1a60445a5f
commit
af8f06413e
|
@ -61,7 +61,7 @@ class Glitch::KeywordMute < ApplicationRecord
|
||||||
end
|
end
|
||||||
|
|
||||||
def =~(str)
|
def =~(str)
|
||||||
regex ? regex =~ str : false
|
regex ? regex =~ str : nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue