fix: 修复发送通知

This commit is contained in:
2026-05-29 10:48:47 +08:00
parent bb923ee2b3
commit 048bd53163

View File

@@ -56,7 +56,15 @@ async def send_webhook(group_id: str, file_url: str) -> dict:
"Authorization": f"Bearer {config.WEBHOOK_API_TOKEN}", "Authorization": f"Bearer {config.WEBHOOK_API_TOKEN}",
} }
payload = {"group_id": group_id, "url": file_url, "type": "image"} payload = {
"group_id": group_id,
"messages": [
{
"type": "image",
"url": file_url,
},
],
}
async with httpx.AsyncClient(timeout=10) as client: async with httpx.AsyncClient(timeout=10) as client:
resp = await client.post(url, json=payload, headers=headers) resp = await client.post(url, json=payload, headers=headers)