mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 20:40:43 +00:00
fix: restore Baileys media upload streaming
This commit is contained in:
@@ -24,13 +24,11 @@ index 0d32dfb4882dfe029ba8804772d7d89404b08e76..73809fcd1d52362aef0c35cb7416c29d
|
|||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
let result;
|
let result;
|
||||||
try {
|
try {
|
||||||
- const stream = createReadStream(filePath);
|
const stream = createReadStream(filePath);
|
||||||
+ const body = await fs.readFile(filePath);
|
|
||||||
const response = await fetch(url, {
|
const response = await fetch(url, {
|
||||||
- dispatcher: fetchAgent,
|
- dispatcher: fetchAgent,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
- body: stream,
|
body: stream,
|
||||||
+ body,
|
|
||||||
headers: {
|
headers: {
|
||||||
...(() => {
|
...(() => {
|
||||||
const hdrs = options?.headers;
|
const hdrs = options?.headers;
|
||||||
|
|||||||
6
pnpm-lock.yaml
generated
6
pnpm-lock.yaml
generated
@@ -29,7 +29,7 @@ packageExtensionsChecksum: sha256-n+P/SQo4Pf+dHYpYn1Y6wL4cJEVoVzZ835N0OEp4TM8=
|
|||||||
|
|
||||||
patchedDependencies:
|
patchedDependencies:
|
||||||
'@whiskeysockets/baileys@7.0.0-rc.9':
|
'@whiskeysockets/baileys@7.0.0-rc.9':
|
||||||
hash: c79c66180c377cf57f4dd1657c85b572fafb3cf9667ea36af5d4a991eb6bb709
|
hash: 5a0b2527947a3aabf3c7f11cd6ff61e4ba7b5a2c13516fec4cb275dc63bd0308
|
||||||
path: patches/@whiskeysockets__baileys@7.0.0-rc.9.patch
|
path: patches/@whiskeysockets__baileys@7.0.0-rc.9.patch
|
||||||
|
|
||||||
importers:
|
importers:
|
||||||
@@ -1226,7 +1226,7 @@ importers:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@whiskeysockets/baileys':
|
'@whiskeysockets/baileys':
|
||||||
specifier: 7.0.0-rc.9
|
specifier: 7.0.0-rc.9
|
||||||
version: 7.0.0-rc.9(patch_hash=c79c66180c377cf57f4dd1657c85b572fafb3cf9667ea36af5d4a991eb6bb709)(audio-decode@2.2.3)(jimp@1.6.1)(sharp@0.34.5)
|
version: 7.0.0-rc.9(patch_hash=5a0b2527947a3aabf3c7f11cd6ff61e4ba7b5a2c13516fec4cb275dc63bd0308)(audio-decode@2.2.3)(jimp@1.6.1)(sharp@0.34.5)
|
||||||
jimp:
|
jimp:
|
||||||
specifier: ^1.6.1
|
specifier: ^1.6.1
|
||||||
version: 1.6.1
|
version: 1.6.1
|
||||||
@@ -11428,7 +11428,7 @@ snapshots:
|
|||||||
'@wasm-audio-decoders/common': 9.0.7
|
'@wasm-audio-decoders/common': 9.0.7
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@whiskeysockets/baileys@7.0.0-rc.9(patch_hash=c79c66180c377cf57f4dd1657c85b572fafb3cf9667ea36af5d4a991eb6bb709)(audio-decode@2.2.3)(jimp@1.6.1)(sharp@0.34.5)':
|
'@whiskeysockets/baileys@7.0.0-rc.9(patch_hash=5a0b2527947a3aabf3c7f11cd6ff61e4ba7b5a2c13516fec4cb275dc63bd0308)(audio-decode@2.2.3)(jimp@1.6.1)(sharp@0.34.5)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@cacheable/node-cache': 1.7.6
|
'@cacheable/node-cache': 1.7.6
|
||||||
'@hapi/boom': 9.1.4
|
'@hapi/boom': 9.1.4
|
||||||
|
|||||||
Reference in New Issue
Block a user