From 6da65d3b03b1217cc9b3a8166a7e274d3dd9dca8 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Sun, 15 Jun 2025 21:25:14 +0800 Subject: [PATCH] add MessageAction --- app/chain/message.py | 4 ++-- app/schemas/types.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/chain/message.py b/app/chain/message.py index d840141a..9eab2774 100644 --- a/app/chain/message.py +++ b/app/chain/message.py @@ -517,10 +517,10 @@ class MessageChain(ChainBase): plugin_id, content = callback_data.split("|", 1) # 广播给插件处理 self.eventmanager.send_event( - EventType.UserMessage, + EventType.MessageAction, { - "text": content, "plugin_id": plugin_id.replace("[PLUGIN]", ""), + "text": content, "userid": userid, "channel": channel, "source": source, diff --git a/app/schemas/types.py b/app/schemas/types.py index ade78204..4235be22 100644 --- a/app/schemas/types.py +++ b/app/schemas/types.py @@ -63,6 +63,8 @@ class EventType(Enum): ModuleReload = "module.reload" # 配置项更新 ConfigChanged = "config.updated" + # 消息交互动作 + MessageAction = "message.action" # 同步链式事件