koishi-plugin-group-analysis-mx 1.5.7 → 1.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/service/analysis.js +3 -3
- package/package.json +2 -1
package/lib/service/analysis.js
CHANGED
|
@@ -919,7 +919,7 @@ class AnalysisService extends koishi_1.Service {
|
|
|
919
919
|
const norm = (0, utils_1.normalizeNickname)(sVal);
|
|
920
920
|
if (norm && nicknameMap.has(norm))
|
|
921
921
|
return nicknameMap.get(norm);
|
|
922
|
-
if (/^[0-9A-Fa-f]{16,}$/.test(cleaned)
|
|
922
|
+
if (/^[0-9A-Fa-f]{16,}$/.test(cleaned))
|
|
923
923
|
return '群友';
|
|
924
924
|
return sVal;
|
|
925
925
|
};
|
|
@@ -955,7 +955,7 @@ class AnalysisService extends koishi_1.Service {
|
|
|
955
955
|
// 金句:LLM 输入用 [user_id],这里按 ID 精确回填完整昵称(含 emoji),并补全头像。
|
|
956
956
|
if (Array.isArray(goldenQuotes)) {
|
|
957
957
|
// 官方 bot 的 userId 可能是 openid(长十六进制串),不能直接当昵称显示
|
|
958
|
-
const isOpenId = (v) => { const x = String(v || '').trim(); if (!x) return false; if (/^\d+$/.test(x)) return false; return /^[0-9A-Fa-f]{16,}$/.test(x)
|
|
958
|
+
const isOpenId = (v) => { const x = String(v || '').trim(); if (!x) return false; if (/^\d+$/.test(x)) return false; return /^[0-9A-Fa-f]{16,}$/.test(x); };
|
|
959
959
|
// id → 完整昵称(群名片优先,回退消息昵称;跳过 openid 形式)
|
|
960
960
|
const idToNickname = new Map();
|
|
961
961
|
for (const msg of messages) {
|
|
@@ -984,7 +984,7 @@ class AnalysisService extends koishi_1.Service {
|
|
|
984
984
|
'';
|
|
985
985
|
if (realName)
|
|
986
986
|
quote.sender = realName;
|
|
987
|
-
else if (isOpenId(quote.sender)
|
|
987
|
+
else if (isOpenId(quote.sender))
|
|
988
988
|
quote.sender = '群友';
|
|
989
989
|
if (!quote.avatar) {
|
|
990
990
|
quote.avatar =
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "koishi-plugin-group-analysis-mx",
|
|
3
3
|
"description": "群聊分析插件 - 生成精美群聊统计报告,支持 AI 话题总结(独立版,不依赖 ChatLuna)",
|
|
4
|
-
"version": "1.5.
|
|
4
|
+
"version": "1.5.8",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.mjs",
|
|
7
7
|
"typings": "lib/index.d.ts",
|
|
@@ -50,3 +50,4 @@
|
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
|
|
53
|
+
|