加入转发视频功能

This commit is contained in:
liuwei
2025-06-13 15:22:35 +08:00
parent 7f12e531f6
commit 11d633c1d3

View File

@@ -628,9 +628,9 @@ 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}/SendCDNFileMsg', json=json_param)
response = await session.post(f'http://{self.ip}:{self.port}/api/Msg/SendCDNFile', json=json_param)
json_resp = await response.json()
self.logging.debug("json_resp: %s", json_resp)
if json_resp.get("Success"):
self.logging.info("转发文件消息: 对方wxid:{} xml:{}", wxid, xml)
data = json_resp.get("Data")
@@ -661,8 +661,9 @@ 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}/Msg/SendCDNImg', json=json_param)
response = await session.post(f'http://{self.ip}:{self.port}/api/Msg/SendCDNImg', json=json_param)
json_resp = await response.json()
self.logging.debug("json_resp: %s", json_resp)
if json_resp.get("Success"):
self.logging.info("转发图片消息: 对方wxid:{} xml:{}", wxid, xml)
@@ -694,9 +695,10 @@ 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}/Msg/SendCDNVideo', json=json_param)
response = await session.post(f'http://{self.ip}:{self.port}/api/Msg/SendCDNVideo', json=json_param)
json_resp = await response.json()
self.logging.debug("json_resp: %s", json_resp)
if json_resp.get("Success"):
self.logging.info("转发视频消息: 对方wxid:{} xml:{}", wxid, xml)
data = json_resp.get("Data")