Fixed a few issues with long tweets

This commit is contained in:
2016-07-18 09:56:22 -05:00
parent c1c001ad96
commit f9d869e824
2 changed files with 2 additions and 2 deletions

View File

@@ -51,7 +51,7 @@ def compose_tweet(tweet, db, relative_times):
user = tweet["user"]["name"]
source = re.sub(r"(?s)<.*?>", "", tweet["source"])
if tweet.has_key("retweeted_status"):
if tweet.has_key("message") == False or tweet["retweeted_status"]["is_quote_status"] == False:
if tweet.has_key("message") == False and tweet["retweeted_status"]["is_quote_status"] == False:
text = "RT @%s: %s" % (tweet["retweeted_status"]["user"]["screen_name"], StripChars(tweet["retweeted_status"]["text"]))
elif tweet["retweeted_status"]["is_quote_status"]:
text = "%s" % (StripChars(tweet[value]))