From e6bf4b57f29927748e6a5de8bb2ebdf77fcc8c00 Mon Sep 17 00:00:00 2001 From: Linus2punkt0 Date: Thu, 31 Aug 2023 17:11:25 +0200 Subject: [PATCH] fixed a bug causing quote posts to be treated as replies --- crosspost.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crosspost.py b/crosspost.py index cc6dba3..e544216 100644 --- a/crosspost.py +++ b/crosspost.py @@ -200,7 +200,7 @@ def post(posts): replyTo = posts[cid]["replyTo"] images = posts[cid]["images"] postType = posts[cid]["type"] - langs = postType = posts[cid]["langs"] + langs = posts[cid]["langs"] tweetReply = "" tootReply = "" # If it is a reply, we get the IDs of the posts we want to reply to from the database. @@ -286,7 +286,7 @@ def tweet(post, replyTo, images, postType, doPost): # and if neither it is just posted as a text post. if replyTo and mediaIds and postType == "quote": a = twitter.create_tweet(text=post, quote_tweet_id=replyTo, media_ids=mediaIds) - elif replyTo and mediaIds: + elif replyTo and mediaIds and postType == "reply": a = twitter.create_tweet(text=post, in_reply_to_tweet_id=replyTo, media_ids=mediaIds) elif postType == "quote": a = twitter.create_tweet(text=post, quote_tweet_id=replyTo)