fix(im): reject non-opus audio messages - #1271
Conversation
📝 WalkthroughWalkthroughThis PR adds an "Audio Messages" section to the Lark IM skill guide, stating that ChangesAudio Messages documentation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@skills/lark-im/SKILL.md`:
- Line 60: Update the `--audio` flag documentation to state that it accepts
Opus-format files and explicitly list supported extensions by name (e.g.,
".opus" and ".ogg") to match runtime behavior; reference the `--audio` flag text
in SKILL.md and replace the sentence "only Opus-format files" with a clarified
line like "Opus-format files (e.g., .opus and .ogg) are supported" so users know
.ogg is mapped to Opus at runtime.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@55706cea70181d765b37c3a8e5d5f347a45d694f🧩 Skill updatenpx skills add chenxingtong-bytedance/cli#fix/audio_message_only_opus -y -g |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1271 +/- ##
==========================================
+ Coverage 69.84% 70.18% +0.33%
==========================================
Files 666 671 +5
Lines 64451 65240 +789
==========================================
+ Hits 45019 45786 +767
+ Misses 15812 15783 -29
- Partials 3620 3671 +51 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
7cfb2b5 to
4416f80
Compare
4416f80 to
ca7297a
Compare
92cb705 to
8faed2d
Compare
42538be to
9accbd7
Compare
Change-Id: I48efb309b6222b16f39f18bbb8be039d06c0087c
9accbd7 to
55706ce
Compare
Summary
Fix IM shortcut behavior for audio messages to match the Feishu/Lark file upload API:
--audiois for voice messages and supports only Opus audio. Non-Opus local/URL inputs such asmp3andwavare now rejected before upload with an actionable typed validation error. Users can still send those files as attachments with--file.Changes
--audiovalidation forim +messages-sendandim +messages-reply..opusand Ogg Opus.ogginputs for audio messages..mp3/.wavwithparam=--audioand recovery guidance.--audiohelp text and IM skill docs, including the--filefallback path.Related Issues
Test Plan
go test ./shortcuts/imgo test ./tests/cli_e2e/im -run TestIM_MessagesSendAudioDryRunRejectsNonOpus -count=1make build--file--audio--audiois blocked before upload with typed validation and recovery guidance