Fix notification delivery

This commit is contained in:
2023-02-10 22:52:59 +00:00
parent df273a6009
commit 87c232d3f9
3 changed files with 57 additions and 35 deletions

View File

@@ -56,9 +56,11 @@ def webhook_sendmsg(**kwargs):
msg = kwargs.get("msg", None)
notification_settings = kwargs.get("notification_settings")
url = notification_settings.get("url")
headers = {"Content-type": "application/json"}
try:
requests.post(
f"{url}",
headers=headers,
data=msg,
)
except requests.exceptions.ConnectionError as e: