From 59152877af0bbe9c6fc73ca927757f312a7f6f7d Mon Sep 17 00:00:00 2001 From: chengyongru <2755839590@qq.com> Date: Sat, 4 Apr 2026 01:36:44 +0800 Subject: [PATCH] fix(feishu): support video (media) download by converting type to 'file' Feishu's GetMessageResource API only accepts 'image' or 'file' as the type parameter. Video messages have msg_type='media', which was passed through unchanged, causing error 234001 (Invalid request param). Now both 'audio' and 'media' are converted to 'file' for download. --- nanobot/channels/feishu.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nanobot/channels/feishu.py b/nanobot/channels/feishu.py index 3ea05a3dc..1128c0e16 100644 --- a/nanobot/channels/feishu.py +++ b/nanobot/channels/feishu.py @@ -815,9 +815,9 @@ class FeishuChannel(BaseChannel): """Download a file/audio/media from a Feishu message by message_id and file_key.""" from lark_oapi.api.im.v1 import GetMessageResourceRequest - # Feishu API only accepts 'image' or 'file' as type parameter - # Convert 'audio' to 'file' for API compatibility - if resource_type == "audio": + # Feishu resource download API only accepts 'image' or 'file' as type. + # Both 'audio' and 'media' (video) messages use type='file' for download. + if resource_type in ("audio", "media"): resource_type = "file" try: