Twitter: properly reverse the tweets list, remove it from the TODO

This commit is contained in:
Brian S. Stephan 2011-02-25 21:10:54 -06:00
parent 7a53aaa9a1
commit 67403971df
2 changed files with 4 additions and 3 deletions

1
TODO
View File

@ -14,5 +14,4 @@ dr.botzo --- TODO
note: see commit 3333fe125e8c06a739b4d5e4bbc3ef5c1070fe91
* periodic reconnects when disconnected/split
* Alias: convert to use database, since configparser stuff mangles (lowercases) keys
* Twitter: print statuses in ascending date order (just reverse the list?)
* put all bot config in the database?

View File

@ -243,7 +243,8 @@ class Twitter(Module):
if since_id is not None and output_channel != '':
tweets = self.twit.GetFriendsTimeline(since_id=since_id)
for tweet in tweets.reverse():
tweets.reverse()
for tweet in tweets:
tweet_text = self._return_tweet_or_retweet_text(tweet=tweet, print_source=True)
self.sendmsg(self.connection, output_channel.encode('utf-8', 'ignore'), tweet_text)
@ -251,7 +252,8 @@ class Twitter(Module):
new_since_id = self._get_latest_tweet_id(tweets, since_id)
tweets = self.twit.GetMentions(since_id=since_id)
for tweet in tweets.reverse():
tweets.reverse()
for tweet in tweets:
tweet_text = self._return_tweet_or_retweet_text(tweet=tweet, print_source=True)
self.sendmsg(self.connection, output_channel.encode('utf-8', 'ignore'), tweet_text)