1
0
mirror of https://github.com/funamitech/mastodon synced 2024-12-02 16:58:53 +09:00

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.
This commit is contained in:
David Yip 2017-10-22 01:11:17 -05:00
parent 1a60445a5f
commit af8f06413e

View File

@ -61,7 +61,7 @@ class Glitch::KeywordMute < ApplicationRecord
end
def =~(str)
regex ? regex =~ str : false
regex ? regex =~ str : nil
end
end
end