修复拍一拍事件误判触发问题
1. 移除基于<patMsg>子串的PAT判定,避免普通appmsg被误识别为拍一拍事件。 2. 事件识别收敛为sysmsg type=pat结构化解析优先,系统消息含拍了拍作为兜底。 3. 保持原有拍一拍功能可用,同时杜绝无拍一拍场景误触发。
This commit is contained in:
@@ -371,9 +371,9 @@ class FunCommandPlayPlugin(MessagePluginInterface):
|
||||
msg_type_value = getattr(msg_type, "value", msg_type)
|
||||
is_system = str(msg_type_value) in {str(MessageType.SYSTEM.value), str(MessageType.SYSTEM_NOTIFY.value), "10000", "10002"}
|
||||
|
||||
lowered_content = content.lower()
|
||||
if "<patmsg" in lowered_content:
|
||||
return "PAT"
|
||||
# 注意:这里明确不再用 "<patMsg" 子串做判定。
|
||||
# 原因:大量普通 appmsg 结构里也会带 patMsg 节点(例如 recordNum=0),
|
||||
# 会导致非拍一拍消息被误识别成 PAT 事件。
|
||||
if is_system and "拍了拍" in content:
|
||||
return "PAT"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user