855 协议版本-调整完毕内容
This commit is contained in:
@@ -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, "不转发自己的消息"
|
||||
|
||||
Reference in New Issue
Block a user