Skip to content

Commit

Permalink
Merge pull request #225 from Build-Squad/update-celery-task-for-sent-…
Browse files Browse the repository at this point in the history
…tweet

Fix like_tweet function to use client.like instead of client.like_tweet
  • Loading branch information
varsha1305nav authored Mar 5, 2024
2 parents 0f781e2 + c951a83 commit 73dc0de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/api/marketplace/orders/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ def tweet(text, client):

def like_tweet(tweet_id, client):
try:
res = client.like_tweet(tweet_id=tweet_id, user_auth=False)
return res.data['id']
res = client.like(tweet_id=tweet_id, user_auth=False)
return tweet_id if res.data['liked'] else None
except Exception as e:
raise Exception(str(e))

Expand Down Expand Up @@ -118,7 +118,7 @@ def poll(text, poll_options, poll_duration_minutes, client):
def retweet(tweet_id, client):
try:
res = client.retweet(tweet_id=tweet_id, user_auth=False)
return res.data['id']
return res.data['rest_id']
except Exception as e:
raise Exception(str(e))

Expand Down

0 comments on commit 73dc0de

Please sign in to comment.