Skip to content

Commit

Permalink
Mastodon: log returned toot dict, return id and uri
Browse files Browse the repository at this point in the history
  • Loading branch information
Kunsi committed Dec 27, 2024
1 parent 31f0cf2 commit fe67824
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion voctopublish/api_client/mastodon_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,12 @@ def send_toot(ticket, config):
access_token="mastodon_usercred.secret",
api_base_url=config["mastodon"]["api_base_url"],
)
mastodon.toot(message)
toot = mastodon.toot(message)
LOG.debug(toot)
return {
'id': toot['id'],
'uri': toot['uri'],
}
except Exception as e_:
# we don't care if tooting fails here.
LOG.exception("Tooting failed")

0 comments on commit fe67824

Please sign in to comment.