From c900b065abc4ded8b0ed43e207148b18aa846a5a Mon Sep 17 00:00:00 2001 From: cquest Date: Mon, 2 May 2022 16:07:24 +0200 Subject: [PATCH] use proper id --- tootbot.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tootbot.py b/tootbot.py index b49e70d..4fa87a4 100755 --- a/tootbot.py +++ b/tootbot.py @@ -136,14 +136,15 @@ for t in reversed(d.entries): if tags: c = c + '\n' + tags - + if toot_media is not None: - toot = mastodon_api.status_post(c, in_reply_to_id=None, + toot = mastodon_api.status_post(c, + in_reply_to_id=None, media_ids=toot_media, sensitive=False, visibility='public', spoiler_text=None) if "id" in toot: db.execute("INSERT INTO tweets VALUES ( ? , ? , ? , ? , ? )", - (t.id, toot["id"], source, mastodon, instance)) + (id, toot["id"], source, mastodon, instance)) sql.commit()