@searchfe/openclaw-baiduapp 0.1.1 → 0.1.2

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/dist/index.js CHANGED
@@ -4277,7 +4277,10 @@ async function sendBaiduAppMessage(account, message, options) {
4277
4277
  }
4278
4278
  const payload = {
4279
4279
  msgtype: "text",
4280
- text: { content: message }
4280
+ text: { content: message },
4281
+ ...options?.msgid != null ? { msgid: options.msgid } : {},
4282
+ ...options?.streamId != null ? { streamId: options.streamId } : {},
4283
+ ...options?.chunkKey != null ? { chunkKey: options.chunkKey } : {}
4281
4284
  };
4282
4285
  const plaintext = JSON.stringify(payload);
4283
4286
  const encrypt = encryptBaiduAppPlaintext({
@@ -4294,12 +4297,7 @@ async function sendBaiduAppMessage(account, message, options) {
4294
4297
  });
4295
4298
  const sendMessageUrl = `${account.apiBase}/chat/openclaw/callback`;
4296
4299
  const url = `${sendMessageUrl}?timestamp=${encodeURIComponent(timestamp)}&ak=${encodeURIComponent(account.appKey ?? "")}&nonce=${encodeURIComponent(nonce)}&msg_signature=${encodeURIComponent(msgSignature)}`;
4297
- const body = JSON.stringify({
4298
- encrypt,
4299
- ...options?.msgid != null ? { msgid: options.msgid } : {},
4300
- ...options?.streamId != null ? { streamId: options.streamId } : {},
4301
- ...options?.chunkKey != null ? { chunkKey: options.chunkKey } : {}
4302
- });
4300
+ const body = JSON.stringify({ encrypt });
4303
4301
  logger.info(`POST ${url}`);
4304
4302
  logger.debug(`request body: ${body}`);
4305
4303
  const resp = await fetch(url, {