调试逻辑
This commit is contained in:
@@ -7,7 +7,7 @@ from utils.wechat.contact_manager import ContactManager
|
||||
from db.connection import DBConnectionManager
|
||||
from db.group_virtual_redis import GroupVirtualRedisDB
|
||||
from wechat_ipad import WechatAPIClient
|
||||
from wechat_ipad.models.message import WxMessage
|
||||
from wechat_ipad.models.message import WxMessage, MessageType
|
||||
|
||||
|
||||
class GroupVirtualPlugin(MessagePluginInterface):
|
||||
@@ -160,12 +160,11 @@ class GroupVirtualPlugin(MessagePluginInterface):
|
||||
# 构建转发消息前缀
|
||||
prefix = f"[{sender_name}@{source_group_name}]:"
|
||||
|
||||
self.LOG.debug(f"prefix: {prefix}")
|
||||
# 根据消息类型处理
|
||||
msg_type = message.get("type", 0)
|
||||
|
||||
# 文本消息
|
||||
if msg_type == 1:
|
||||
if msg_type == MessageType.TEXT:
|
||||
content = message.get("content", "")
|
||||
forward_content = f"{prefix}{content}"
|
||||
self.LOG.debug(f"forward_content: {forward_content}")
|
||||
|
||||
Reference in New Issue
Block a user