mirror of
https://github.com/thewesker/twitter_ebooks.git
synced 2025-12-23 13:51:09 -05:00
Merge pull request #41 from Stawberri/regex_rt
Regex soft-retweet detection
This commit is contained in:
@@ -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 ')
|
||||
@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]
|
||||
|
||||
Reference in New Issue
Block a user