Skip to content

Commit

Permalink
added in_reply_to_status_id
Browse files Browse the repository at this point in the history
  • Loading branch information
prehensile committed Mar 13, 2012
1 parent 7527466 commit c3ec1ab
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions brains.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ def digest_user( api, deadline, mm_twitteruser ):

return statuses_digested

def post_tweet( api, tweet ):
def post_tweet( api, tweet, in_reply_to_status_id=None ):
if tweet is not None:
try:
api.update_status( status=tweet )
api.update_status( status=tweet, in_reply_to_status_id=in_reply_to_status_id )
# print tweet
# logging.debug( tweet )
except Exception, err:
Expand Down Expand Up @@ -145,9 +145,10 @@ def run( creds, force_tweet=False ):
safety = safety -1

if tweet is not None:
reply = "%s %s" % (reply, tweet)
post_tweet( api, reply )
last_replied_id = mention.id_str
reply = "%s %s" % (reply, tweet)
post_tweet( api, reply, last_replied_id )


creds.last_replied_id = last_replied_id
creds.put()
Expand Down

0 comments on commit c3ec1ab

Please sign in to comment.