mirror of
https://github.com/moltbot/moltbot.git
synced 2026-03-08 06:54:24 +00:00
fix(feishu): restore explicit media request timeouts
This commit is contained in:
@@ -106,6 +106,7 @@ export async function downloadImageFeishu(params: {
|
||||
|
||||
const response = await client.im.image.get({
|
||||
path: { image_key: normalizedImageKey },
|
||||
timeout: FEISHU_MEDIA_HTTP_TIMEOUT_MS,
|
||||
});
|
||||
|
||||
const buffer = await readFeishuResponseBuffer({
|
||||
@@ -145,6 +146,7 @@ export async function downloadMessageResourceFeishu(params: {
|
||||
const response = await client.im.messageResource.get({
|
||||
path: { message_id: messageId, file_key: normalizedFileKey },
|
||||
params: { type },
|
||||
timeout: FEISHU_MEDIA_HTTP_TIMEOUT_MS,
|
||||
});
|
||||
|
||||
const buffer = await readFeishuResponseBuffer({
|
||||
@@ -200,6 +202,7 @@ export async function uploadImageFeishu(params: {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- SDK accepts Buffer or ReadStream
|
||||
image: imageData as any,
|
||||
},
|
||||
timeout: FEISHU_MEDIA_HTTP_TIMEOUT_MS,
|
||||
});
|
||||
|
||||
// SDK v1.30+ returns data directly without code wrapper on success
|
||||
@@ -274,6 +277,7 @@ export async function uploadFileFeishu(params: {
|
||||
file: fileData as any,
|
||||
...(duration !== undefined && { duration }),
|
||||
},
|
||||
timeout: FEISHU_MEDIA_HTTP_TIMEOUT_MS,
|
||||
});
|
||||
|
||||
// SDK v1.30+ returns data directly without code wrapper on success
|
||||
|
||||
Reference in New Issue
Block a user