-
-
Notifications
You must be signed in to change notification settings - Fork 68.8k
[Bug]: [feishu] Audio messages use wrong msg_type "media" instead of "audio" #25464
Copy link
Copy link
Closed
Closed
Copy link
Labels
bugSomething isn't workingSomething isn't working
Description
Summary
Bug
Sending .opus audio files via the Feishu plugin fails with:
The type of file upload does not match the type of message being sent.
The plugin falls back to a text message like 📎 /path/to/file.opus.
Root Cause
In extensions/feishu/src/media.ts, sendMediaFeishu uses msg_type: "media" for both audio and video:
const isMedia = fileType === "mp4" || fileType === "opus";
msgType: isMedia ? "media" : "file"But Feishu API requires:
- Audio (opus):
msg_type: "audio" - Video (mp4):
msg_type: "media"
Fix
// sendFileFeishu msgType type should include "audio"
msgType?: "file" | "media" | "audio";
// sendMediaFeishu: map file types correctly
const msgType = fileType === "opus" ? "audio" : fileType === "mp4" ? "media" : "file";Reproduce
- Generate an opus file
message(action=send, channel=feishu, filePath=workspace/file.opus)- Feishu returns type mismatch error
- Falls back to text with 📎 prefix
Environment
- OpenClaw gateway on WSL2
- Feishu plugin (extensions/feishu)
- Node v24.13.1
Steps to reproduce
- Generate an opus file
message(action=send, channel=feishu, filePath=workspace/file.opus)- Feishu returns type mismatch error
- Falls back to text with 📎 prefix
Expected behavior
Opus files should be sent with msg_type: "audio" so Feishu renders them as playable voice messages, not file attachments or fallback text.
Actual behavior
Opus files are uploaded with file_type: "opus" but sent with msg_type: "media" (video type). Feishu rejects the mismatch, and the plugin falls back to sending a plain text message: 📎 /path/to/file.opus.
OpenClaw version
2026.2.22-2
Operating system
WSL2 on Windows11 — Ubuntu 24.04 / Linux 6.6.87 (x64)
Install method
No response
Logs, screenshots, and evidence
Impact and severity
No response
Additional information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Fields
Give feedbackNo fields configured for issues without a type.