docs(im): document chat.user_setting batch_query/batch_update - #1339
Conversation
📝 WalkthroughWalkthroughThis PR adds documentation for new ChangesChat User Settings API Documentation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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: 2
🤖 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`:
- Around line 161-162: The registry lookup failed for the scope
im:chat.user_setting:write used by chat.user_setting.batch_update; check the
registry entries and either add the missing im:chat.user_setting:write scope or
correct the scope name to match the existing read entry
(im:chat.user_setting:read) and update the mapping used by
chat.user_setting.batch_update accordingly; after updating, run the registry
lookup/validation and any permission tests to confirm the write scope resolves.
- Line 113: The SKILL.md incorrectly documents a write scope for
chat.user_setting.batch_update that doesn't exist in the codebase; locate the
chat.user_setting.batch_update entry in skills/lark-im/SKILL.md and either
remove or correct the write scope to match the actual registered permission
im:chat.user_setting:read, or alternatively add the missing registry entry
im:chat.user_setting:write in the authoritative permission registry (and
corresponding code/fixtures) so the documented scope matches the implemented
permission; ensure references to im:chat.user_setting:read and
im:chat.user_setting:write and the skill name chat.user_setting.batch_update are
updated consistently.
🪄 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@2bcd46f1f1366f69e855423ad9475ccdd5c4ab0e🧩 Skill updatenpx skills add shifengjuan-dev/lark-cli#feat/im-chat-user-setting -y -g |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1339 +/- ##
==========================================
+ Coverage 72.75% 72.82% +0.06%
==========================================
Files 730 731 +1
Lines 69034 69096 +62
==========================================
+ Hits 50228 50320 +92
+ Misses 15034 14999 -35
- Partials 3772 3777 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@coderabbitai review Both findings re: the |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Verify the scope in meta_data.json
echo "=== Checking meta_data.json for chat_user_setting ==="
rg -n "chat_user_setting" internal/registry/meta_data.json | head -30
echo ""
echo "=== Checking around line 15436 ==="
sed -n '15430,15445p' internal/registry/meta_data.json 2>/dev/null || echo "File not found or sed failed"
echo ""
echo "=== Checking for im:chat.user_setting:write in meta_data.json ==="
rg -n "im:chat.user_setting:write" internal/registry/meta_data.json | head -10
echo ""
echo "=== Checking scope_priorities.json for comparison ==="
rg -n "chat.user_setting" internal/registry/scope_priorities.json 2>/dev/null | head -10
echo ""
echo "=== Reading the changed file ==="
cat skills/lark-im/SKILL.mdLength of output: 13612
Re-review of The changes are accurate and consistent with the rest of the document:
No issues found. The documentation is well-structured and correct. ✏️ Learnings added
|
c32eed3 to
ab2a7fb
Compare
Add the chat.user_setting resource (per-user mute prefs: is_muted / is_mute_at_all, user-only, <=10 chats per call) to the lark-im skill's API Resources list and permission table, exposing batch_query / batch_update via the generic im gateway. Change-Id: Ifdd163bfa1cdbfcb56cbf12a3f52e40b61d85e2d
ab2a7fb to
2bcd46f
Compare
What
Document the
chat.user_settingresource in the lark-im skill, exposingbatch_query/batch_updatevia the genericlark-cli im <resource> <method>gateway.Per-user in-chat mute preferences:
is_muted— mute normal messagesis_mute_at_all— mute @ALL messagesUser identity only (
user_access_token); caller must be in each target chat; up to 10 chats per call.Changes
### chat.user_settingentry under API Resources (batch_query,batch_update).batch_query→im:chat.user_setting:read,batch_update→im:chat.user_setting:write.Docs only; no code changes.
Summary by CodeRabbit