1
0
mirror of https://github.com/ihabunek/toot.git synced 2025-01-03 14:56:37 -05:00

Fix last ID not saving when using --json

This commit is contained in:
Ivan Habunek 2024-11-27 19:46:18 +01:00
parent eb175029a8
commit 54a111d669
No known key found for this signature in database
GPG Key ID: 01DB3DD0D824504C

View File

@ -184,10 +184,11 @@ def post(
poll_hide_totals=poll_hide_totals,
)
status = response.json()
if json:
click.echo(response.text)
else:
status = response.json()
if "scheduled_at" in status:
scheduled_at = parse_datetime(status["scheduled_at"])
scheduled_at = datetime.strftime(scheduled_at, "%Y-%m-%d %H:%M:%S%z")