调整json格式存储link信息

This commit is contained in:
liuwei
2025-06-10 14:29:08 +08:00
parent 4286bb21a2
commit 1d61576ae7
6 changed files with 191 additions and 39 deletions

View File

@@ -1,16 +1,15 @@
import xml.etree.ElementTree as ET
from datetime import datetime
from typing import Dict, Any, List, Optional, Tuple
import xml.etree.ElementTree as ET
from base.plugin_common.message_plugin_interface import MessagePluginInterface
from base.plugin_common.plugin_interface import PluginStatus
from db.connection import DBConnectionManager
from db.contacts_db import ContactsDBOperator
from utils.robot_cmd.robot_command import Feature, PermissionStatus, GroupBotManager
from utils.robot_cmd.robot_command import PermissionStatus, GroupBotManager
from utils.wechat.contact_manager import ContactManager
from wechat_ipad import WechatAPIClient
from wechat_ipad.models.appmsg_xml import LINK_XML
from wechat_ipad.models.appmsg_xml import LINK_XML_WELCOME
class GroupMemberChangePlugin(MessagePluginInterface):
@@ -141,7 +140,7 @@ class GroupMemberChangePlugin(MessagePluginInterface):
contact_db.save_chatroom_member_simple(roomid, member_details)
except Exception as e:
self.LOG.warning(f"新增群员信息失败: {e}")
xml_content = f"{LINK_XML}".format(nickname=nickname, now=now, head_url=head_url)
xml_content = f"{LINK_XML_WELCOME}".format(nickname=nickname, now=now, head_url=head_url)
await bot.send_link_xml_message(xml_content, roomid)
return True, "已发送进群欢迎语"