Skip to content

feat: add group admin commands#265

Merged
dinakars777 merged 3 commits into
openclaw:mainfrom
dovocoder:feature/group-admin-expansion
May 23, 2026
Merged

feat: add group admin commands#265
dinakars777 merged 3 commits into
openclaw:mainfrom
dovocoder:feature/group-admin-expansion

Conversation

@dovocoder
Copy link
Copy Markdown
Contributor

Summary

  • Add live group administration commands: create, topic/description, announce-only toggle, locked/admin-only-edits toggle, and join request list/approve/reject.
  • Add whatsmeow wrapper methods and app interface coverage for the new group mutations.
  • Document the new command surface and update the changelog.

Live Test

Performed against a real linked WhatsApp session using contacts named Assistent and Automator.

  • Created live test group 120363428272512126@g.us named wacli live test 2026-05-23 with Assistent and Automator invited.
  • Verified groups topic set the group description live.
  • Verified groups description alias updated the group description live.
  • Verified groups announce-only --on via groups info: IsAnnounce=true.
  • Verified groups locked --on via groups info: IsLocked=true.
  • Restored announce-only --off and locked --off; final groups info showed IsAnnounce=false and IsLocked=false.
  • Cleared the description; final Topic was empty.
  • Verified groups requests list hit the live endpoint successfully and returned an empty list because there were no pending join requests.
  • Cleanup: removed Assistent and Automator from the throwaway group; final participant list contained only the owner account.

Automated Checks

  • pnpm format:check && pnpm lint && pnpm test && pnpm build && git diff --check

@clawsweeper
Copy link
Copy Markdown

clawsweeper Bot commented May 22, 2026

Codex review: needs maintainer review before merge.

Latest ClawSweeper review: 2026-05-22 22:58 UTC / May 22, 2026, 6:58 PM ET.

Workflow note: Future ClawSweeper reviews update this same comment in place.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

Summary
The PR adds group create, topic/description, announce-only, locked, and join-request commands with WA client wrappers, fake coverage, docs, and changelog updates.

Reproducibility: not applicable. as a feature PR rather than a bug report. The changed behavior is supported by source inspection, focused parser/registration tests, and the contributor's live WhatsApp proof.

PR rating
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster
Patch quality: 🐚 platinum hermit
Summary: Strong live proof and a coherent, focused implementation make this a normal good PR after the toggle fix.

Rank-up moves:

  • none
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Real behavior proof
Sufficient (live_output): The PR body includes after-change live WhatsApp proof covering group creation, description updates, announce/locked toggles in both directions, join-request listing, and cleanup.

Next step before merge
No repair lane is needed; the remaining path is ordinary maintainer review and merge validation.

Security
Cleared: The patch adds authenticated WhatsApp group-admin operations without dependency, CI, secret, auth-storage, or supply-chain changes.

Review details

Best possible solution:

Land the feature after standard maintainer review and CI, preserving the existing groups command and WA wrapper patterns.

Do we have a high-confidence way to reproduce the issue?

Not applicable as a feature PR rather than a bug report. The changed behavior is supported by source inspection, focused parser/registration tests, and the contributor's live WhatsApp proof.

Is this the best way to solve the issue?

Yes. The implementation follows the existing groups CLI and WA wrapper structure, and the follow-up commit addresses the previous boolean toggle parsing issue with regression coverage.

Label changes:

  • add rating: 🐚 platinum hermit: Current PR rating is 🐚 platinum hermit because proof is 🦞 diamond lobster, patch quality is 🐚 platinum hermit, and Strong live proof and a coherent, focused implementation make this a normal good PR after the toggle fix.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body includes after-change live WhatsApp proof covering group creation, description updates, announce/locked toggles in both directions, join-request listing, and cleanup.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.
  • remove merge-risk: 🚨 message-delivery: Current PR review selected no merge-risk labels.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P2: This is a normal-priority user-facing feature PR with live WhatsApp mutation behavior and focused test/docs coverage.
  • rating: 🐚 platinum hermit: Current PR rating is 🐚 platinum hermit because proof is 🦞 diamond lobster, patch quality is 🐚 platinum hermit, and Strong live proof and a coherent, focused implementation make this a normal good PR after the toggle fix.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body includes after-change live WhatsApp proof covering group creation, description updates, announce/locked toggles in both directions, join-request listing, and cleanup.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes after-change live WhatsApp proof covering group creation, description updates, announce/locked toggles in both directions, join-request listing, and cleanup.

What I checked:

  • Current main boundary: Current main registers only the existing groups subcommands, so the new group-admin surface is not already implemented on main. (cmd/wacli/groups.go:5, 201f7adcaf16)
  • PR command wiring: The PR registers the new create, topic, description, announce-only, locked, and requests subcommands under groups. (cmd/wacli/groups.go:10, 7c506b8daed5)
  • Toggle blocker fixed: The current PR head validates the actual --on/--off boolean values and rejects explicit false values instead of treating flag presence as enable/disable intent. (cmd/wacli/groups_admin.go:331, 7c506b8daed5)
  • Focused regression tests: The added tests cover command registration, group-JID validation, user parsing, exactly-one toggle behavior, and explicit --on=false/--off=false rejection. (cmd/wacli/groups_admin_test.go:11, 7c506b8daed5)
  • Docs updated: The groups docs list the new command surface and describe create, topic/description, announce-only, locked, and requests behavior. (docs/groups.md:12, 7c506b8daed5)
  • Live proof in PR body: The PR body reports a real linked WhatsApp session test that created a throwaway group, changed description, toggled announce/locked on and off, listed join requests, and cleaned up participants. (7c506b8daed5)

Likely related people:

  • Peter Steinberger: Blame and history show the current groups command surface, internal WA group wrapper, group-module split, release snapshot, and initial whatsmeow CLI work are primarily in this history. (role: feature-history owner; confidence: high; commits: 201f7adcaf16, 5ca42035de2f, 8b725754b368; files: cmd/wacli/groups.go, cmd/wacli/groups_info_rename.go, cmd/wacli/groups_participants.go)
  • Dinakar Sarbada: History shows nearby changelog/docs and repo-wide module-path work touching the groups documentation and command surface context. (role: adjacent docs and repo contributor; confidence: medium; commits: 9d948c123f81, cdddf110ef54; files: docs/groups.md, CHANGELOG.md, cmd/wacli/groups.go)
  • Dovocoder: Separate current-main history shows prior merged WhatsApp command work, including status sending and poll compatibility, so the author has adjacent domain history beyond this PR. (role: adjacent WhatsApp command contributor; confidence: medium; commits: 3613468d33b4, f453bb4e7d98; files: cmd/wacli, internal/wa)

Codex review notes: model gpt-5.5, reasoning high; reviewed against 54cb3f385733.

@dovocoder dovocoder marked this pull request as ready for review May 22, 2026 22:42
@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 message-delivery 🚨 Merging this PR could drop, duplicate, misroute, suppress, or wrongly target messages. labels May 22, 2026
@clawsweeper
Copy link
Copy Markdown

clawsweeper Bot commented May 22, 2026

ClawSweeper PR egg

✨ Hatched: 🥚 common Clockwork Crabkin

Hatched PR egg: 🥚 common Clockwork Crabkin

Hatch command

Comment @clawsweeper hatch when this PR is hatchable.

Hatchability rules:

  • Merged PRs are hatchable.
  • Open PRs are hatchable when they are status: 👀 ready for maintainer look, status: 🚀 automerge armed, or labeled clawsweeper:automerge.
  • Closed unmerged PRs are hatchable only when one of those hatchable labels is still present in the durable record.

Rarity: 🥚 common.
Trait: watches the merge queue.
Image traits: location green-check meadow; accessory review stamp; palette pearl, teal, and neon green; mood celebratory; pose pointing at a small proof artifact; shell polished stone shell; lighting moonlit rim light; background tiny shells and proof notes.
Share on X: post this hatch
Copy: My PR egg hatched a 🥚 common Clockwork Crabkin in ClawSweeper.

What is this egg doing here?
  • Eggs appear after the PR passes real-behavior proof. It is here for vibes, not verdicts: it does not change labels, ratings, merge decisions, or automation.
  • The shell reacts to review momentum: open follow-up work warms it up, re-review makes it wobble, and a clean final review lets it hatch.
  • Hatchability usually comes from sufficient real-behavior proof, no blocking P0/P1/P2 findings, no security attention needed, and clean correctness. A merged PR is already final, so merge makes the egg hatchable independently.
  • The hatch is seeded from this repository and PR number, so the same PR keeps the same creature; the reviewed head SHA can only change safe visual details.
  • Rarity is just collectible sparkle: 🥚 common, 🌱 uncommon, 💎 rare, ✨ glimmer, and 🌈 legendary.

@dovocoder
Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper
Copy link
Copy Markdown

clawsweeper Bot commented May 22, 2026

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. merge-risk: 🚨 message-delivery 🚨 Merging this PR could drop, duplicate, misroute, suppress, or wrongly target messages. labels May 22, 2026
@dovocoder
Copy link
Copy Markdown
Contributor Author

@clawsweeper hatch

@clawsweeper
Copy link
Copy Markdown

clawsweeper Bot commented May 22, 2026

🦞👀
ClawSweeper PR egg hatch requested.

I queued a comment sync for this PR. If the egg is hatchable, ClawSweeper will generate the image once and update the existing review comment.
Action: PR egg hatch queued (workflow sweep.yml, event repository_dispatch).
The ASCII egg stays as the fallback.

@dinakars777 dinakars777 merged commit dc75b68 into openclaw:main May 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants