From 4c95754d8b6363cab921c2ad521cce1803b52cc6 Mon Sep 17 00:00:00 2001 From: liuwei Date: Fri, 15 Aug 2025 15:03:40 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/douyin_parser/main.py | 2 +- wechat_ipad/client/message.py | 4 ++-- wechat_ipad/models/appmsg_xml.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/douyin_parser/main.py b/plugins/douyin_parser/main.py index 20969cb..9ea83eb 100644 --- a/plugins/douyin_parser/main.py +++ b/plugins/douyin_parser/main.py @@ -167,7 +167,7 @@ class DouyinParserPlugin(MessagePluginInterface): url=video_url, thumburl=cover ) - await self.bot.send_app_message((roomid if roomid else sender), xml_content, 0) + await self.bot.send_link_xml_message(xml_content, (roomid if roomid else sender)) return True, "发送卡片成功" except DouyinParserError as e: diff --git a/wechat_ipad/client/message.py b/wechat_ipad/client/message.py index 624faee..859091b 100644 --- a/wechat_ipad/client/message.py +++ b/wechat_ipad/client/message.py @@ -450,7 +450,7 @@ class MessageMixin(WechatAPIClientBase): async with aiohttp.ClientSession() as session: json_param = {"Wxid": self.wxid, "ToWxid": towxid, "Xml": xml, "Type": 0} - + logger.debug(f"_send_link_xml_message:{xml}") response = await session.post(f'http://{self.ip}:{self.port}/api/Msg/ShareLink', json=json_param) json_resp = await response.json() logger.info(f"_send_link_xml_message resp:{json_resp}") @@ -584,7 +584,7 @@ class MessageMixin(WechatAPIClientBase): """ return await self._queue_message(self._send_app_message, wxid, xml, type) - async def _send_app_message(self, wxid: str, xml: str, type: int=0) -> tuple[int, int, int]: + async def _send_app_message(self, wxid: str, xml: str, type: int = 0) -> tuple[int, int, int]: if not self.wxid: raise UserLoggedOut("请先登录") # { diff --git a/wechat_ipad/models/appmsg_xml.py b/wechat_ipad/models/appmsg_xml.py index ca25e31..c36905a 100644 --- a/wechat_ipad/models/appmsg_xml.py +++ b/wechat_ipad/models/appmsg_xml.py @@ -132,7 +132,7 @@ LINK_XML_NORMAL = """ -WXID +Jyunere 0 1