Display users correctly in longtweets. Fixes #135

This commit is contained in:
2017-05-08 14:14:31 +04:00
parent 0a3219d12a
commit df5967079c
2 changed files with 3 additions and 2 deletions

View File

@@ -472,8 +472,8 @@ class Session(object):
if tweet["message"] == False: return False
tweet["twishort"] = True
for i in tweet["entities"]["user_mentions"]:
if "@%s" % (i["screen_name"] not in tweet["message"]) and i["screen_name"] != tweet["user"]["screen_name"]:
if "@%s" % (i["screen_name"]) not in tweet["message"] and i["screen_name"] != tweet["user"]["screen_name"]:
if tweet.has_key("retweeted_status") and tweet["retweeted_status"]["user"]["screen_name"] == i["screen_name"]:
continue
tweet["message"] = u"@%s %s" % (i["screen_name"], tweet["message"])
tweet["message"] = u"@%s %s" % (i["screen_name"], tweet["message"])
return tweet