Made conversations work correctly
This commit is contained in:
@ -159,21 +159,20 @@ class GetConversation(ApiThread):
|
||||
# Get the root tweet
|
||||
try:
|
||||
with self.api.lock:
|
||||
last_tweet = self.api.GetStatus(self.single_tweet)
|
||||
last_tweet = self.api.GetStatus(self.root_tweet_id)
|
||||
statuses.append(last_tweet)
|
||||
except (HTTPError, URLError):
|
||||
statuses = None
|
||||
last_tweet = None
|
||||
|
||||
# get tweets in a loop, until there is no in_reply_to_status_id
|
||||
if last_tweet is not None:
|
||||
while last_tweet.in_reply_to_status_id is not None:
|
||||
try:
|
||||
with self.api.lock:
|
||||
last_tweet = self.api.GetStatus(self.single_tweet)
|
||||
statuses.append(last_tweet)
|
||||
except (HTTPError, URLError):
|
||||
last_tweet = None
|
||||
while last_tweet and last_tweet.in_reply_to_status_id:
|
||||
try:
|
||||
with self.api.lock:
|
||||
last_tweet = self.api.GetStatus(last_tweet.in_reply_to_status_id)
|
||||
statuses.append(last_tweet)
|
||||
except (HTTPError, URLError):
|
||||
last_tweet = None
|
||||
|
||||
# In case we've never seen some of these users, grab their profile images and cache them
|
||||
for status in statuses:
|
||||
|
Reference in New Issue
Block a user