855 协议版本-调整完毕内容

This commit is contained in:
liuwei
2025-04-30 13:22:33 +08:00
parent 869bce8a18
commit 454d084715
88 changed files with 1565 additions and 7816 deletions

View File

@@ -1,7 +1,5 @@
import logging
from typing import Dict, Any, List, Optional, Tuple
from gewechat.call_back_message.message import WxMessage
from message_util import MessageUtil
from plugin_common.message_plugin_interface import MessagePluginInterface
from plugin_common.plugin_interface import PluginStatus
@@ -9,6 +7,7 @@ from utils.decorator.plugin_decorators import plugin_stats_decorator
from utils.wechat.contact_manager import ContactManager
from db.connection import DBConnectionManager
from db.group_virtual_redis import GroupVirtualRedisDB
from wechat_ipad.models.message import WxMessage
class GroupVirtualPlugin(MessagePluginInterface):
@@ -46,7 +45,6 @@ class GroupVirtualPlugin(MessagePluginInterface):
def initialize(self, context: Dict[str, Any]) -> bool:
"""初始化插件"""
self.LOG = logging.getLogger(f"Plugin.{self.name}")
self.LOG.info(f"正在初始化 {self.name} 插件...")
# 保存上下文对象
@@ -97,7 +95,7 @@ class GroupVirtualPlugin(MessagePluginInterface):
"""处理消息"""
roomid = message.get("roomid", "")
sender = message.get("sender", "")
full_wx_msg: WxMessage = message.get("full_wx_msg", "")
full_wx_msg: WxMessage = message.get("full_wx_msg")
# 检查是否是机器人自己发送的消息
if full_wx_msg.from_self():
return False, "不转发自己的消息"