修复过滤规则误杀用户消息
- 规则4豁免:OCR把@误读为)时,若匹配到已知用户名则放行而非丢弃 - 短句过滤器:含句末标点(。)或口语确认词(好的/嗯/明白等)的短句放行 - 问题:')游戏专用 关于我们'被规则4丢弃,'那么好。'被短句过滤器丢弃
This commit is contained in:
+5
-1
@@ -4105,7 +4105,11 @@ class MessageMonitor:
|
||||
# ⭐ 2026-08-11: 规则4剥离")昵称 "前缀的行(如"关于我们")是真实用户消息,
|
||||
# 豁免短句检查——否则规则4放行+前缀剥离全白做,消息仍被此规则丢弃。
|
||||
# ⭐ 2026-08-12: 包含括号的消息(如"端0(基岩版)")可能是有效短消息,放行
|
||||
if not has_q and line not in _ui_prefix_stripped and not re.search(r'[()()]', line):
|
||||
# ⭐ 2026-08-18: 含句末标点(。)或口语确认词(好的/嗯/明白)的短句放行
|
||||
has_period_end = line.endswith('。') or line.endswith('!')
|
||||
has_confirm = any(w in line for w in ('好的', '嗯', '明白', '收到', '了解', '知道了'))
|
||||
if not has_q and line not in _ui_prefix_stripped and not re.search(r'[()()]', line) \
|
||||
and not has_period_end and not has_confirm:
|
||||
logger.debug(f"[{platform}] OCR 过滤: 短句碎片(≤8字无问词) line={line!r}")
|
||||
continue
|
||||
# ★ 以特殊符号(~、`等)开头 → OCR把"一键"识别为"~键"等碎片
|
||||
|
||||
Reference in New Issue
Block a user