From 8c7b1086ff88801ccb7a74b1b0d40e39dc36c599 Mon Sep 17 00:00:00 2001 From: pllx Date: Thu, 30 Apr 2026 15:07:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B7=91=E9=A9=AC=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E5=B1=8F=E8=94=BD=E8=AF=86=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/js/chat-room/message-renderer.js | 2 +- resources/js/chat-room/preferences-status.js | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/resources/js/chat-room/message-renderer.js b/resources/js/chat-room/message-renderer.js index 52ba5ae..9eaba14 100644 --- a/resources/js/chat-room/message-renderer.js +++ b/resources/js/chat-room/message-renderer.js @@ -219,7 +219,7 @@ function resolveGameNotificationCardMeta(msg) { || normalizedContent.startsWith("🏇 比赛开始:") || normalizedContent.startsWith("🏆 冠军:") || /^🐎\s*第\s*#?\d+\s*场开赛/u.test(normalizedContent) - || /^🏇\s*第\s*#?\d+\s*场比赛开始/u.test(normalizedContent) + || /^🏇\s*(?:赛马)?第\s*#?\d+\s*场比赛开始/u.test(normalizedContent) || /^🏆\s*第\s*#?\d+\s*场结束/u.test(normalizedContent) ) { return { diff --git a/resources/js/chat-room/preferences-status.js b/resources/js/chat-room/preferences-status.js index 4c2f2c5..6e8e3db 100644 --- a/resources/js/chat-room/preferences-status.js +++ b/resources/js/chat-room/preferences-status.js @@ -545,14 +545,18 @@ export function resolveBlockedSystemSenderKey(msg) { return "百家乐"; } - // 赛马通知已缩短为“开赛:...”“比赛开始:...”“冠军:...”等格式。 + // 赛马通知可能来自旧版“跑马”发送者,也可能以系统传音发送紧凑开赛/结束文案。 if ( + fromUser === "跑马" || isSystemBroadcast && ( content.includes("赛马") || content.includes("跑马") || content.startsWith("🐎 开赛:") || content.startsWith("🏇 比赛开始:") || - content.startsWith("🏆 冠军:") + content.startsWith("🏆 冠军:") || + /^🐎\s*第\s*#?\d+\s*场开赛/u.test(content) || + /^🏇\s*(?:赛马)?第\s*#?\d+\s*场比赛开始/u.test(content) || + /^🏆\s*第\s*#?\d+\s*场结束/u.test(content) ) ) { return "跑马";