调整json格式存储link信息
This commit is contained in:
@@ -13,6 +13,7 @@ from utils.decorator.async_job import async_job
|
||||
from utils.decorator.plugin_decorators import plugin_stats_decorator
|
||||
from utils.robot_cmd.robot_command import PermissionStatus, GroupBotManager
|
||||
from wechat_ipad import WechatAPIClient
|
||||
from wechat_ipad.models.appmsg_xml import LINK_XML_NORMAL
|
||||
|
||||
|
||||
class MessagePushTask(MessagePluginInterface):
|
||||
@@ -174,7 +175,14 @@ class MessagePushTask(MessagePluginInterface):
|
||||
|
||||
# 发送链接消息
|
||||
if content_link:
|
||||
await self.bot.send_link_message(group_id, content_link)
|
||||
# content_link json 读取内容
|
||||
link_data = json.loads(content_link)
|
||||
xml_content = f"{LINK_XML_NORMAL}".format(title=link_data.get('title', ''),
|
||||
des=link_data.get('des', ''),
|
||||
url=link_data.get('url', ''),
|
||||
thumburl=link_data.get('thumburl', '')
|
||||
)
|
||||
await self.bot.send_link_xml_message(xml_content, group_id)
|
||||
|
||||
# # 发送小程序消息
|
||||
# if content_miniprogram:
|
||||
|
||||
Reference in New Issue
Block a user