From 7c826af5d138e5c45c5939ffff23877bdb41d109 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=80=BB?= Date: Tue, 10 Mar 2026 03:57:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=20sessionKey=20?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E4=B8=BA=20botId:chatId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 之前格式:wecom:chatType:chatId 现在格式:botId:chatId 例如: - aib55ZBHxW398XZkgYgwFPp1cXwtxUWQQf7:group:123456789 - aib55ZBHxW398XZkgYgwFPp1cXwtxUWQQf7:direct:zhangsan 这样每个 Bot 的会话独立管理,符合 OpenClaw 会话管理规范。 --- electron/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/electron/main.js b/electron/main.js index 16bbdba..776b7f2 100644 --- a/electron/main.js +++ b/electron/main.js @@ -164,8 +164,8 @@ class WeComConnection { text = text.replace(/@\S+/g, '').trim(); } - // 构建 sessionKey(格式:wecom:chatType:chatId) - const sessionKey = `wecom:${chatType}:${chatId}`; + // 构建 sessionKey(格式:botId:chatId) + const sessionKey = `${this.botId}:${chatId}`; // 处理媒体文件 const attachments = [];