Skip to content

docs: add im chat member delete notes#229

Merged
niuchong0523 merged 1 commit intolarksuite:mainfrom
niuchong0523:feature/add-delete-chat-members-command
Apr 3, 2026
Merged

docs: add im chat member delete notes#229
niuchong0523 merged 1 commit intolarksuite:mainfrom
niuchong0523:feature/add-delete-chat-members-command

Conversation

@niuchong0523
Copy link
Copy Markdown
Collaborator

@niuchong0523 niuchong0523 commented Apr 2, 2026

Summary

  • document the IM chat member delete API in the IM skill reference
  • add the required scope entry for chat.members.delete

Test plan

  • reviewed diff to ensure only skills/lark-im/SKILL.md is included
  • no runtime tests needed for this docs-only change

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added documentation for a chat members deletion API method
    • Documented supported identities: users and bots
    • Specified allowed callers: group owner, admin, and creator bot
    • Documented batch limits: up to 50 users or 5 bots per request
    • Updated permissions table with the required API scope

@github-actions github-actions bot added domain/im PR touches the im domain size/M Single-domain feat or fix with limited business impact labels Apr 2, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 2, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9fe0d319-d4dc-4440-b577-e7e5b37352ad

📥 Commits

Reviewing files that changed from the base of the PR and between 057b007 and d8942cd.

📒 Files selected for processing (1)
  • skills/lark-im/SKILL.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • skills/lark-im/SKILL.md

📝 Walkthrough

Walkthrough

Added documentation for the im.chat.members.delete API in Lark IM skills, specifying supported identities (user, bot), caller role requirements (group owner/admin or creator bot), per-request limits (up to 50 users or 5 bots), and the im:chat.members:write_only permission mapping.

Changes

Cohort / File(s) Summary
Lark IM Skills Documentation
skills/lark-im/SKILL.md
Added im.chat.members.delete API doc: supported identities (user, bot), caller role constraints (group owner/admin or creator bot), request limits (≤50 users or ≤5 bots), and updated permissions table to include im:chat.members:write_only.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐇 I nibble on docs with delight,
A delete method now in sight,
Owners, bots, and limits too—
Fifty hops, five bots true,
Cheers from this rabbit tonight! 🎉

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description covers Summary and Test Plan sections from the template, but the Changes section (listing main changes) is missing. Add a Changes section that explicitly lists the main changes, such as 'Added documentation for chat.members.delete API' and 'Added scope entry for chat.members.delete'.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding documentation for the IM chat member delete API notes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 2, 2026

CLA assistant check
All committers have signed the CLA.

@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Apr 2, 2026

Greptile Summary

This is a docs-only PR that adds a delete entry under chat.members in the IM skill reference and inserts the corresponding im:chat.members:write_only scope row into the permissions table. Both additions are consistent in format and placement with the existing documentation.

Confidence Score: 5/5

Safe to merge — purely additive documentation with no runtime impact.

All changes are documentation-only. The new entry is correctly placed, uses consistent formatting, and the assigned scope im:chat.members:write_only matches the analogous create operation. No logic, configuration, or executable code is modified.

No files require special attention.

Important Files Changed

Filename Overview
skills/lark-im/SKILL.md Adds chat.members.delete API entry and its scope row — placement, description format, and scope value are all consistent with adjacent entries.

Sequence Diagram

sequenceDiagram
    participant Caller as Caller (user/bot)
    participant LarkCLI as lark-cli
    participant LarkAPI as Lark IM API

    Caller->>LarkCLI: lark-cli im chat.members delete --chat-id oc_xxx --member-ids [...]
    LarkCLI->>LarkAPI: DELETE /im/v1/chats/{chat_id}/members<br/>scope: im:chat.members:write_only
    Note over LarkAPI: Validates caller is owner / admin / creator bot<br/>Enforces limit: ≤50 users or ≤5 bots
    alt Success
        LarkAPI-->>LarkCLI: 200 OK
        LarkCLI-->>Caller: Members removed
    else Caller lacks permission
        LarkAPI-->>LarkCLI: 403 Forbidden
        LarkCLI-->>Caller: Error: not owner/admin/creator-bot
    else Batch limit exceeded
        LarkAPI-->>LarkCLI: 400 Bad Request
        LarkCLI-->>Caller: Error: too many members in one request
    end
Loading

Reviews (2): Last reviewed commit: "docs: add im chat member delete scope no..." | Re-trigger Greptile

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
skills/lark-im/SKILL.md (1)

90-90: Consider expanding the documentation to match the detail level of chat.members.create.

The documentation for chat.members.delete is more concise than chat.members.create (line 89). Consider adding details about:

  • Whether the caller must be in the target chat
  • Tenant restrictions for internal chats (operator must belong to same tenant)
  • App availability constraints for bot calls
  • Whether members can remove themselves (the phrase "remove others" implies this but isn't explicit)

This would ensure consistent documentation detail across related operations.

📝 Example expanded documentation
-  - `delete` — 将用户或机器人移出群聊。Identity: supports `user` and `bot`; only group owner, admin, or creator bot can remove others; max 50 users or 5 bots per request.
+  - `delete` — 将用户或机器人移出群聊。Identity: supports `user` and `bot`; the caller must be in the target chat; only group owner, admin, or creator bot can remove others (members can remove themselves); for internal chats the operator must belong to the same tenant; for `bot` calls, removed users must be within the app's availability; max 50 users or 5 bots per request.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/lark-im/SKILL.md` at line 90, Update the `chat.members.delete`
documentation to match the detail level of `chat.members.create`: explicitly
state whether the caller must be present in the target chat, clarify tenant
restrictions for internal chats (operator must belong to the same tenant),
document app availability constraints when the caller is a bot (which bots can
call this API and under what permissions), and state whether members are allowed
to remove themselves versus only removing others; reference the
`chat.members.delete` and `chat.members.create` entries so the wording and
parameter/permission details mirror the existing `create` doc style for
consistency.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@skills/lark-im/SKILL.md`:
- Line 90: Update the `chat.members.delete` documentation to match the detail
level of `chat.members.create`: explicitly state whether the caller must be
present in the target chat, clarify tenant restrictions for internal chats
(operator must belong to the same tenant), document app availability constraints
when the caller is a bot (which bots can call this API and under what
permissions), and state whether members are allowed to remove themselves versus
only removing others; reference the `chat.members.delete` and
`chat.members.create` entries so the wording and parameter/permission details
mirror the existing `create` doc style for consistency.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4b991ed8-5fe7-4ec2-a9ad-294d67cb85dc

📥 Commits

Reviewing files that changed from the base of the PR and between 10caeb5 and 057b007.

📒 Files selected for processing (1)
  • skills/lark-im/SKILL.md

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

🚀 PR Preview Install Guide

🧰 CLI update

npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@d8942cd9f183ce9f848f355b7a92d7cc99a049d0

🧩 Skill update

npx skills add niuchong0523/cli#feature/add-delete-chat-members-command -y -g

Document the IM chat member delete API and required scope so the new capability is visible in the IM skill reference.
@niuchong0523 niuchong0523 force-pushed the feature/add-delete-chat-members-command branch from 057b007 to d8942cd Compare April 2, 2026 12:39
@niuchong0523 niuchong0523 merged commit 9e367b4 into larksuite:main Apr 3, 2026
9 checks passed
@liangshuo-1 liangshuo-1 mentioned this pull request Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain/im PR touches the im domain size/M Single-domain feat or fix with limited business impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants