Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

Commit

Permalink
Improve quoted status detection
Browse files Browse the repository at this point in the history
It seems sometimes twitter does not pass the quoted status, which makes
the #quoted_status? function return false, even if there's a
quoted_status attached. Try to check for permalink too.
  • Loading branch information
renatolond committed Apr 10, 2020
1 parent 1f91862 commit f560399
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/twitter_user_processor.rb
Expand Up @@ -130,13 +130,19 @@ def process_tweet
process_retweet
elsif tweet.reply?
process_reply
elsif tweet.quoted_status?
elsif is_quoted_status?
process_quote
else
process_normal_tweet
end
end

def is_quoted_status?
tweet.quoted_status? || tweet.quoted_status_permalink.present?
rescue KeyError
false
end

def process_retweet
@type = :retweet
if user.retweet_do_not_post?
Expand Down

0 comments on commit f560399

Please sign in to comment.