fix(feishu): handle message_type "media" for video downloads (openclaw#25502) thanks @4ier
Verified: - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: 4ier <5648066+4ier@users.noreply.github.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
This commit is contained in:
@@ -371,7 +371,8 @@ function parseMediaKeys(
|
||||
case "audio":
|
||||
return { fileKey };
|
||||
case "video":
|
||||
// Video has both file_key (video) and image_key (thumbnail)
|
||||
case "media":
|
||||
// Video/media has both file_key (video) and image_key (thumbnail)
|
||||
return { fileKey, imageKey };
|
||||
case "sticker":
|
||||
return { fileKey };
|
||||
@@ -471,6 +472,7 @@ function inferPlaceholder(messageType: string): string {
|
||||
case "audio":
|
||||
return "<media:audio>";
|
||||
case "video":
|
||||
case "media":
|
||||
return "<media:video>";
|
||||
case "sticker":
|
||||
return "<media:sticker>";
|
||||
@@ -495,7 +497,7 @@ async function resolveFeishuMediaList(params: {
|
||||
const { cfg, messageId, messageType, content, maxBytes, log, accountId } = params;
|
||||
|
||||
// Only process media message types (including post for embedded images)
|
||||
const mediaTypes = ["image", "file", "audio", "video", "sticker", "post"];
|
||||
const mediaTypes = ["image", "file", "audio", "video", "media", "sticker", "post"];
|
||||
if (!mediaTypes.includes(messageType)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user