From 7f12e531f6e7610d4623209a9c10557ba2d5ab5f Mon Sep 17 00:00:00 2001 From: liuwei Date: Fri, 13 Jun 2025 15:05:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E8=BD=AC=E5=8F=91=E8=A7=86?= =?UTF-8?q?=E9=A2=91=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/group_virtual/main.py | 9 +++++++++ wechat_ipad/client/message.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/plugins/group_virtual/main.py b/plugins/group_virtual/main.py index d9fb10e..8674826 100644 --- a/plugins/group_virtual/main.py +++ b/plugins/group_virtual/main.py @@ -181,7 +181,16 @@ class GroupVirtualPlugin(MessagePluginInterface): await self.bot.send_text_message(group["id"], f"{prefix}[图片]") # 转发图片 xml_content = message.get("content", "") + self.LOG.debug(f"xml_content: {xml_content}") await self.bot.send_cdn_img_msg(group["id"], xml_content) + elif msg_type == MessageType.VIDEO: + for group in chat_group["groups"]: + if group["id"] != roomid: + await self.bot.send_text_message(group["id"], f"{prefix}[视频]") + # 转发图片 + xml_content = message.get("content", "") + self.LOG.debug(f"xml_content: {xml_content}") + await self.bot.send_cdn_video_msg(group["id"], xml_content) def _get_chat_group(self, chat_group_id: str) -> Optional[Dict[str, Any]]: """获取虚拟聊天组""" diff --git a/wechat_ipad/client/message.py b/wechat_ipad/client/message.py index 8e42eda..0cf379d 100644 --- a/wechat_ipad/client/message.py +++ b/wechat_ipad/client/message.py @@ -694,7 +694,7 @@ class MessageMixin(WechatAPIClientBase): async with aiohttp.ClientSession() as session: json_param = {"Wxid": self.wxid, "ToWxid": wxid, "Content": xml} - response = await session.post(f'http://{self.ip}:{self.port}/SendCDNVideoMsg', json=json_param) + response = await session.post(f'http://{self.ip}:{self.port}/Msg/SendCDNVideo', json=json_param) json_resp = await response.json() if json_resp.get("Success"):