@wu529778790/open-im 1.8.3-beta.12 → 1.8.3-beta.14

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.
@@ -145,18 +145,20 @@ export class WorkBuddyCentrifugeClient {
145
145
  // WeChat KF messages: send via HTTP COPILOT_RESPONSE
146
146
  if (this.config.httpBaseUrl && this.config.httpAccessToken) {
147
147
  const message = payload.content?.map((c) => c.text).join('') || payload.error || '';
148
- // Incoming chatId format: "<wechatExternalUserId>::origin::wechatkfProxy"
149
- // Server requires chatId = just the WeChat external user ID (the part before "::").
150
- const chatIdFull = payload.session_id;
151
- const chatId = chatIdFull.includes('::') ? chatIdFull.split('::')[0] : chatIdFull;
148
+ // Pass the full chatId as received from Centrifuge (e.g. "wmXXX::origin::wechatkfProxy").
149
+ // The server identifies WeChat KF messages by the "::origin::wechatkfProxy" suffix
150
+ // and extracts the external_userid from it to use as WeChat KF send_msg touser.
151
+ const chatId = payload.session_id;
152
152
  const httpPayload = {
153
153
  type: 'COPILOT_RESPONSE',
154
154
  msgId: payload.prompt_id,
155
- chatId, // WeChat external user ID only — server uses this as touser
155
+ chatId,
156
156
  success: payload.stop_reason === 'end_turn',
157
157
  message,
158
158
  metadata: {
159
- sessionId: this.config.workspaceSessionId || payload.session_id,
159
+ // Use the incoming session_id (WeChat KF compound chatId) so the server
160
+ // can extract the external_userid for the WeChat KF send_msg touser.
161
+ sessionId: payload.session_id,
160
162
  requestId: payload.prompt_id,
161
163
  state: payload.stop_reason === 'end_turn' ? 'completed' : payload.stop_reason,
162
164
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wu529778790/open-im",
3
- "version": "1.8.3-beta.12",
3
+ "version": "1.8.3-beta.14",
4
4
  "description": "Multi-platform IM bridge for AI CLI tools (Claude, Codex, CodeBuddy)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",