feat: Add WhatsApp poll support#248
Merged
steipete merged 1 commit intoopenclaw:mainfrom Jan 6, 2026
Merged
Conversation
Implements issue #123 - WhatsApp Poll Support ## Gateway Protocol - Add `poll` RPC method with params: to, question, options (2-12), selectableCount ## ActiveWebListener - Add `sendPoll(to, poll)` method to interface - Implementation uses Baileys poll message type ## CLI Command - `clawdbot poll --to <jid> -q <question> -o <opt1> -o <opt2> [-s count]` - Supports --dry-run, --json, --verbose flags - Validates 2-12 options ## Changes - src/gateway/protocol/schema.ts: Add PollParamsSchema - src/gateway/protocol/index.ts: Export validator and types - src/web/active-listener.ts: Add sendPoll to interface - src/web/inbound.ts: Implement sendPoll using Baileys - src/web/outbound.ts: Add sendPollWhatsApp function - src/gateway/server-methods/send.ts: Add poll handler - src/commands/poll.ts: New CLI command - src/cli/program.ts: Register poll command Closes #123
Contributor
|
This is very cool, thank you! |
Contributor
|
Follow-up (clean summary; my last comment lost inline code formatting). Thanks again @dbhurley — I built on this PR and implemented the unified approach (shared poll model + per-provider adapters). Changes landed locally (commit ea38e257):
Verification: |
Contributor
|
Follow-up: PR #248 is merged, and the poll feature is now unified across providers. Post-merge follow-ups on main:
Thanks again for the original poll plumbing, @dbhurley. |
dgarson
added a commit
to dgarson/clawdbot
that referenced
this pull request
Feb 9, 2026
* gateway: unify exec and tool approval pending state into single ToolApprovalManager
Route legacy exec.approval.request|resolve through canonical ToolApprovalManager
so there is one pending-approval state machine. Add resolveCompat() for legacy
callers that only provide { id, decision } without requestHash. Both legacy and
canonical events emit correctly for exec-origin requests. Anti-stale requestHash
validation remains effective for canonical tool.approval.resolve callers.
* chore: fix import ordering (formatter)
* fix: restrict exec.approval.resolve to exec-only approvals (cross-tool bypass guard)
---------
Co-authored-by: Claude <noreply@anthropic.com>
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
Implements issue openclaw#123 - WhatsApp Poll Support ## Gateway Protocol - Add `poll` RPC method with params: to, question, options (2-12), selectableCount ## ActiveWebListener - Add `sendPoll(to, poll)` method to interface - Implementation uses Baileys poll message type ## CLI Command - `clawdbot poll --to <jid> -q <question> -o <opt1> -o <opt2> [-s count]` - Supports --dry-run, --json, --verbose flags - Validates 2-12 options ## Changes - src/gateway/protocol/schema.ts: Add PollParamsSchema - src/gateway/protocol/index.ts: Export validator and types - src/web/active-listener.ts: Add sendPoll to interface - src/web/inbound.ts: Implement sendPoll using Baileys - src/web/outbound.ts: Add sendPollWhatsApp function - src/gateway/server-methods/send.ts: Add poll handler - src/commands/poll.ts: New CLI command - src/cli/program.ts: Register poll command Closes openclaw#123
lovewanwan
pushed a commit
to lovewanwan/openclaw
that referenced
this pull request
Apr 28, 2026
Implements issue openclaw#123 - WhatsApp Poll Support ## Gateway Protocol - Add `poll` RPC method with params: to, question, options (2-12), selectableCount ## ActiveWebListener - Add `sendPoll(to, poll)` method to interface - Implementation uses Baileys poll message type ## CLI Command - `clawdbot poll --to <jid> -q <question> -o <opt1> -o <opt2> [-s count]` - Supports --dry-run, --json, --verbose flags - Validates 2-12 options ## Changes - src/gateway/protocol/schema.ts: Add PollParamsSchema - src/gateway/protocol/index.ts: Export validator and types - src/web/active-listener.ts: Add sendPoll to interface - src/web/inbound.ts: Implement sendPoll using Baileys - src/web/outbound.ts: Add sendPollWhatsApp function - src/gateway/server-methods/send.ts: Add poll handler - src/commands/poll.ts: New CLI command - src/cli/program.ts: Register poll command Closes openclaw#123
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements #123 - Adds the ability to create WhatsApp polls programmatically via CLI and gateway RPC.
Changes
Gateway Protocol (
src/gateway/protocol/)PollParamsSchemawith validation for:to: Recipient JID (required)question: Poll question (required)options: Array of 2-12 options (required)selectableCount: How many options user can select (default: 1)idempotencyKey: For deduplication (required)ActiveWebListener (
src/web/)sendPoll(to, poll)method to the interfaceinbound.tsusing Baileys:Gateway RPC (
src/gateway/server-methods/send.ts)pollmethod handler with validation and idempotencyCLI Command (
src/commands/poll.ts,src/cli/program.ts)Testing
sendcommandChecklist
Closes #123