From 149e9da59bf5b66d29be258250eae4e7968bdb17 Mon Sep 17 00:00:00 2001 From: 16337 <1633794139@qq.com> Date: Wed, 11 Mar 2026 22:16:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20news=E5=9B=BE=E6=96=87=E6=B6=88=E6=81=AF?= =?UTF-8?q?url=E5=AD=97=E6=AE=B5=E5=BF=85=E5=A1=AB=EF=BC=8C=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E9=BB=98=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 企微appchat/send的news消息类型要求url必填,否则报errcode 41010 Co-Authored-By: Claude Opus 4.6 --- app/services/wechat_service.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/services/wechat_service.py b/app/services/wechat_service.py index 7890ed7..4c93225 100644 --- a/app/services/wechat_service.py +++ b/app/services/wechat_service.py @@ -417,9 +417,11 @@ class WeChatService: return False try: access_token = await self._get_access_token() - article = {"title": title, "description": description} - if url: - article["url"] = url + article = { + "title": title, + "description": description, + "url": url or "https://work.weixin.qq.com", + } if picurl: article["picurl"] = picurl