调整内容

This commit is contained in:
liuwei
2025-08-15 15:03:40 +08:00
parent 0dc198370f
commit 4c95754d8b
3 changed files with 4 additions and 4 deletions

View File

@@ -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:

View File

@@ -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("请先登录")
# {

View File

@@ -132,7 +132,7 @@ LINK_XML_NORMAL = """
</weappinfo>
<websearch />
</appmsg>
<fromusername>WXID</fromusername>
<fromusername>Jyunere</fromusername>
<scene>0</scene>
<appinfo>
<version>1</version>