fix: отправка через form-data вместо JSON для совместимости с прокси

This commit is contained in:
2026-05-16 16:02:09 +07:00
parent 8109cbc620
commit a74ffc0671
+1 -1
View File
@@ -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: