加入转发视频功能
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user