Switched to .match for matching

Mispy taught me something about ruby precedence today!
This commit is contained in:
Stawberri 2014-12-06 03:29:29 -08:00
parent c4ba9e139f
commit 6bc89cd4fb

View file

@ -70,7 +70,7 @@ module Ebooks
# - The tweet mentions list contains our username
# - The tweet is not being retweeted by somebody else
# - Or soft-retweeted by somebody else
@mentions.map(&:downcase).include?(@bot.username.downcase) && !@tweet.retweeted_status? && !@tweet.text.start_with?('RT ') && !@tweet.text =~ /([`'"“”]|RT|via|by|from)\s*@/i
@mentions.map(&:downcase).include?(@bot.username.downcase) && !@tweet.retweeted_status? && !@tweet.text.start_with?('RT ') && !@tweet.text.match(/([`'"“”]|RT|via|by|from)\s*@/i)
end
# @param bot [Ebooks::Bot]