fix: 修复发送通知
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user