From 2e98932e98f14b9373234d77037b55f61902d0a4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 24 May 2023 14:20:20 +0200 Subject: [PATCH] Continued: - reformatted, I tried to use post_json_api() for bot postings --- fba.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/fba.py b/fba.py index 1eeb75b..3042952 100644 --- a/fba.py +++ b/fba.py @@ -581,9 +581,16 @@ def send_bot_post(instance: str, blocks: dict): botheaders = {**headers, **{"Authorization": "Bearer " + config["bot_token"]}} - req = reqto.post(f"{config['bot_instance']}/api/v1/statuses", - data={"status":message, "visibility":config['bot_visibility'], "content_type":"text/plain"}, - headers=botheaders, timeout=10).json() + req = reqto.post( + f"{config['bot_instance']}/api/v1/statuses", + data={ + "status" : message, + "visibility" : config['bot_visibility'], + "content_type": "text/plain" + }, + headers=botheaders, + timeout=10 + ).json() return True -- 2.39.5