Your lightweight open-source personal agent.
Python agent-frameworkai-agentai-agentschatbotchatopsdiscord-botllm-agentsllmslocal-llmmcpmodel-context-protocolmulti-agentopenai-compatibleopenclawpersonal-ai-assistantpythonself-hostedtelegram-bot-ai-assistantwebuiworkflow-automation
fix(feishu): use correct msg_type for audio/video files
weipeng009847e2a1e8d707
diff --git a/nanobot/channels/feishu.py b/nanobot/channels/feishu.pyindex d450e25f5..695689e99 100644--- a/nanobot/channels/feishu.py+++ b/nanobot/channels/feishu.py@@ -985,10 +985,13 @@ class FeishuChannel(BaseChannel):else:key = await loop.run_in_executor(None, self._upload_file_sync, file_path)if key:- # Use msg_type "media" for audio/video so users can play inline;- # "file" for everything else (documents, archives, etc.)- if ext in self._AUDIO_EXTS or ext in self._VIDEO_EXTS:- media_type = "media"+ # Use msg_type "audio" for audio, "video" for video, "file" for documents.+ # Feishu requires these specific msg_types for inline playback.+ # Note: "media" is only valid as a tag inside "post" messages, not as a standalone msg_type.+ if ext in self._AUDIO_EXTS:+ media_type = "audio"+ elif ext in self._VIDEO_EXTS:+ media_type = "video"else:media_type = "file"await loop.run_in_executor(