This commit is contained in:
MarkusRost 2021-07-30 10:44:25 +00:00
parent 2efcfcecdd
commit 78da5a1367

View file

@ -132,7 +132,7 @@ def send_to_discord_webhook(data: Optional[DiscordMessage], metadata: DiscordMes
header['Content-Type'] = 'application/json' header['Content-Type'] = 'application/json'
standard_args = dict(headers=header) standard_args = dict(headers=header)
if metadata.method == "POST": if metadata.method == "POST":
req = requests.Request("POST", data.webhook_url + (("&" if "?" in data.webhook_url else "&")+"wait=true" if AUTO_SUPPRESSION_ENABLED else ""), data=repr(data), **standard_args) req = requests.Request("POST", data.webhook_url + (("&" if "?" in data.webhook_url else "?")+"wait=true" if AUTO_SUPPRESSION_ENABLED else ""), data=repr(data), **standard_args)
elif metadata.method == "DELETE": elif metadata.method == "DELETE":
req = requests.Request("DELETE", metadata.webhook_url, **standard_args) req = requests.Request("DELETE", metadata.webhook_url, **standard_args)
elif metadata.method == "PATCH": elif metadata.method == "PATCH":