#13669: feat(feishu): add audio message support
channel: feishu
Cluster:
Feishu Streaming Enhancements
## Summary
Add support for sending audio messages in Feishu with proper `msg_type: 'audio'` instead of `msg_type: 'file'`.
## Problem
When sending audio files (.ogg/.opus) to Feishu, they were displayed as file attachments instead of playable voice messages. This is because the plugin was using `msg_type: 'file'` for all non-image files.
## Solution
- Add `sendAudioFeishu` function that sends messages with `msg_type: 'audio'`
- Update `sendMediaFeishu` to detect .ogg/.opus files and route them through `sendAudioFeishu`
## Testing
Tested with TTS-generated audio files (.ogg format with opus codec). Voice messages now display correctly in Feishu and can be played inline.
## Related
Feishu API documentation: https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/im-v1/message/create_json#c9e08671
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
Adds audio message support to the Feishu extension, allowing `.ogg` and `.opus` files to be sent as playable voice messages instead of file attachments.
**Key changes:**
- Implemented `sendAudioFeishu()` function that sends messages with `msg_type: 'audio'` instead of `msg_type: 'file'`
- Updated `sendMediaFeishu()` to detect `.ogg`/`.opus` extensions and route them through the audio path
- Follows the same pattern as existing `sendImageFeishu` and `sendFileFeishu` functions
- Properly handles both direct messages and replies
**Minor suggestion:**
- Export `sendAudioFeishu` in `index.ts` for API consistency with other send functions
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk
- The implementation correctly follows existing patterns for `sendImageFeishu` and `sendFileFeishu`, properly routes audio files through the new audio message path, and aligns with Feishu API requirements. The only minor issue is that `sendAudioFeishu` should be exported for API consistency, but this doesn't affect functionality since `sendMediaFeishu` is the main entry point.
- No files require special attention
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#15351: feat(feishu): Add native audio message support (voice bubble)
by lovejing0306 · 2026-02-13
94.8%
#10675: feat(feishu): add audio message support and fix file upload
by YumoeZhung · 2026-02-06
91.1%
#21786: feat(feishu): extract embedded video/media from post (rich text) me...
by laopuhuluwa · 2026-02-20
80.7%
#16311: test(feishu): add regression for audio download resource type=file
by Yaxuan42 · 2026-02-14
79.8%
#20685: feat(feishu): add audio/media message support with caption cards
by mmyyfirstb · 2026-02-19
79.0%
#12755: feat(feishu): render post rich text as markdown
by WilsonLiu95 · 2026-02-09
73.4%
#22957: fix(feishu): download media from quoted messages in group chats (#2...
by echoVic · 2026-02-21
73.1%
#14674: feat(feishu): add feishu_chat tool for chat info/member queries
by liuweifly · 2026-02-12
72.4%
#13761: fix(feishu): silently degrade when contact permission is missing
by echoVic · 2026-02-11
71.7%
#8975: feat(feishu): comprehensive enhancements for Feishu channel
by jiulingyun · 2026-02-04
71.7%