From 0af4c9b33f39dadd6b7531243be1abd00ec405d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=99=82=E5=B4=8E=20=E3=82=AE=E3=83=A3=E3=83=A9=E3=82=AF?= =?UTF-8?q?=E3=82=B7=E3=83=BC?= Date: Tue, 24 Feb 2026 18:37:20 +0800 Subject: [PATCH] feat: modify message content processing logic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 加上大小写不敏感以及句末标点 --- electron/services/annualReportService.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/electron/services/annualReportService.ts b/electron/services/annualReportService.ts index 62b15b7..b102a60 100644 --- a/electron/services/annualReportService.ts +++ b/electron/services/annualReportService.ts @@ -491,7 +491,10 @@ class AnnualReportService { // 常用语统计(只统计文本消息,local_type 1 和 244813135921 都是文本消息) if ((msg.local_type === 1 || msg.local_type === 244813135921) && msg.msg_content && msg.is_sent === 1) { - const content = String(msg.msg_content).trim() + const content = String(msg.msg_content) + .trim() + .toLowerCase() + .replace(/[\p{P}\p{S}]+$/gu, ''); // 过滤掉系统消息、链接等 if (content.length >= 2 && content.length <= 20 && !content.includes('http') &&