fix: отправка через form-data вместо JSON для совместимости с прокси
This commit is contained in:
+1
-1
@@ -53,7 +53,7 @@ async def send_telegram(message: str) -> None:
|
|||||||
payload = {"chat_id": TELEGRAM_CHAT_ID, "text": message, "parse_mode": "HTML"}
|
payload = {"chat_id": TELEGRAM_CHAT_ID, "text": message, "parse_mode": "HTML"}
|
||||||
async with httpx.AsyncClient(timeout=10) as client:
|
async with httpx.AsyncClient(timeout=10) as client:
|
||||||
try:
|
try:
|
||||||
resp = await client.post(url, json=payload)
|
resp = await client.post(url, data=payload)
|
||||||
resp.raise_for_status()
|
resp.raise_for_status()
|
||||||
log.info("Telegram: сообщение отправлено")
|
log.info("Telegram: сообщение отправлено")
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
|
|||||||
Reference in New Issue
Block a user