Skip to content

Add Feishu Audio Message Type Support #37868

@ycjlb2023-peteryi

Description

@ycjlb2023-peteryi

Summary

Enable Feishu plugin to send audio messages as msg_type: "audio" instead of "file" for better UX (voice message bubbles vs file attachments)

Problem to solve

When using TTS (e.g., sag skill with ElevenLabs) to generate audio and send via Feishu, the audio is sent as msg_type: "file", which displays as a downloadable file attachment. Users must click to download/play. Feishu API supports msg_type: "audio" for native voice message bubbles that can be played directly in chat, but OpenClaw Feishu plugin doesn't implement this.

Proposed solution

Add audio message type support in extensions/feishu/src/send.ts and extensions/feishu/src/media.ts. Implement sendAudioFeishu() function similar to sendFileFeishu(). Support msg_type: "audio" with content: { "file_key": "file_v2_xxx" } format per Feishu API docs.

Alternatives considered

No response

Impact

Affected: All Feishu users using TTS/voice features
Severity: Medium (UX issue, not blocking)
Frequency: Every time audio is sent
Consequence: Poor UX - users see file attachments instead of native voice messages, extra clicks required to play audio

Evidence/examples

Feishu API documentation: https://open.feishu.cn/document/server-docs/im-v1/message/create
Audio message format: { "msg_type": "audio", "content": { "file_key": "file_v2_xxx" } }
Current workaround: Using file type, but UX is suboptimal.

Additional information

Environment: OpenClaw 2026.3.2, Windows. Happy to test or contribute if needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions