feat: make plugin compatible with LINKAI in most cases

This commit is contained in:
lanvent
2023-06-10 23:42:43 +08:00
parent d1b867a7c0
commit 419a3e518e
8 changed files with 20 additions and 7 deletions

View File

@@ -162,6 +162,8 @@ class ChatChannel(Channel):
reply = e_context["reply"]
if not e_context.is_pass():
logger.debug("[WX] ready to handle context: type={}, content={}".format(context.type, context.content))
if e_context.is_break():
context["generate_breaked_by"] = e_context["breaked_by"]
if context.type == ContextType.TEXT or context.type == ContextType.IMAGE_CREATE: # 文字和图片消息
reply = super().build_reply_content(context.content, context)
elif context.type == ContextType.VOICE: # 语音消息