koishi-plugin-group-analysis-mx 1.6.1 → 1.6.3

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.
@@ -231,8 +231,11 @@ class RendererService extends koishi_1.Service {
231
231
  for (const u of (data.userStats || [])) {
232
232
  if (u && u.avatar && String(u.avatar).startsWith('data:')) {
233
233
  for (const nm of [u.rawName, u.nickname]) {
234
- if (nm && String(nm).trim())
234
+ if (nm && String(nm).trim()) {
235
235
  nameAvatar.set(String(nm).trim(), u.avatar);
236
+ const nn = (0, utils_1.normalizeNickname)(nm);
237
+ if (nn) nameAvatar.set(nn, u.avatar);
238
+ }
236
239
  }
237
240
  }
238
241
  }
@@ -243,6 +246,7 @@ class RendererService extends koishi_1.Service {
243
246
  const img = av ? '<img src="' + av + '" alt="" style="width:1.15em;height:1.15em;border-radius:50%;object-fit:cover;vertical-align:middle;display:inline-block;margin-right:3px">' : '';
244
247
  return '<span class="topic-user" style="display:inline-flex;align-items:center;background:rgba(0,0,0,.055);border-radius:999px;padding:1px 8px 1px 2px;font-size:.92em;line-height:1.7;vertical-align:middle;margin:0 1px">' + img + name + '</span>';
245
248
  };
249
+ try { this.ctx.logger.info(`[chip] 映射昵称=${nameAvatar.size} 候选=${chipNames.length} 话题=${(data.topics || []).length} rawName示例=${JSON.stringify((data.userStats||[]).slice(0,2).map(u=>({n:u.nickname,r:u.rawName,a:String(u.avatar||'').slice(0,15)})))}`); } catch (e) {}
246
250
  const templatePath = this.getSkinPath('template_group.html');
247
251
  const randomId = Math.random().toString(36).substring(2, 15);
248
252
  const skin = this.config.skin || 'md3';
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.6.1",
4
+ "version": "1.6.3",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.mjs",
7
7
  "typings": "lib/index.d.ts",
@@ -54,3 +54,5 @@
54
54
 
55
55
 
56
56
 
57
+
58
+