补充MaiBot提及信号字段以修复@后仍不响应
变更项:\n1. 在 message_info.additional_config 中新增 at_bot 字段,与 is_at 同步。\n2. 在 message_info.additional_config 中新增 is_mentioned 字段,与 is_at 同步。\n3. 兼容 MaiBot 当前 is_mentioned_bot_in_message 的提及识别逻辑,提升群聊@机器人后的回复触发率。\n4. 增加详细中文注释,说明该兼容修复的原因和生效路径。
This commit is contained in:
@@ -564,6 +564,12 @@ class MaiBotAdapterPlugin(MessagePluginInterface):
|
||||
"additional_config": {
|
||||
"source": "abot_maibot_adapter",
|
||||
"is_at": bool(message.get("is_at", False)),
|
||||
# 兼容 MaiBot 当前提及检测逻辑:
|
||||
# 1. is_mentioned_bot_in_message 会优先读取 additional_config.at_bot / is_mentioned;
|
||||
# 2. 之前仅传 is_at,MaiBot 不会把它当作“提及强信号”;
|
||||
# 3. 这里同步双写,确保群里 @ 机器人时能够稳定提升回复概率并触发后续动作。
|
||||
"at_bot": bool(message.get("is_at", False)),
|
||||
"is_mentioned": bool(message.get("is_at", False)),
|
||||
"wx_message_type": msg_type,
|
||||
"collect_only": True,
|
||||
# 额外把本地路由判定结果透传给 MaiBot,便于服务端/日志排查“为何被识别成私聊”。
|
||||
|
||||
Reference in New Issue
Block a user