← Back to PRs

#13669: feat(feishu): add audio message support

by AGI-XiaoBai-No1 open 2026-02-10 20:45 View on GitHub →
channel: feishu
## 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