Skip to content

Telegram polls: sendPollTelegram exists but is not wired into action handler or outbound #16977

@lamberttraccard-assistant

Description

Bug Description

Telegram polls are listed as a new feature in 2026.2.14, but sending a poll via message tool or CLI fails with:

Action poll is not supported for provider telegram

Root Cause (code investigation)

sendPollTelegram exists and is fully implemented in dist/send-*.js (calls api.sendPoll() via grammY), but it is never wired into the execution pipeline:

Path 1 — Action handler

telegramMessageActions.handleAction handles send, react, delete, edit, sticker, sticker-search — but has no case "poll". Falls through to:

throw new Error(`Action ${action} is not supported for provider ${providerId}.`)

Path 2 — Outbound fallback

executePollAction tries dispatchChannelMessageAction first (which throws above). Even if it returned null, the fallback sendPoll() checks getChannelPlugin("telegram").outbound.sendPoll — but the Telegram dock only has { textChunkLimit: 4000 }, no sendPoll property.

Comparison with working providers

  • Discord: has case "poll" in its action handler → calls sendPollDiscord directly ✅
  • WhatsApp: has outbound.sendPoll wired on the web plugin ✅
  • Telegram: has neither ❌

Evidence it was intended

  • Telegram-specific params exist in handlePollAction: pollDurationSeconds and pollAnonymous/pollPublic with explicit channel !== "telegram" guards
  • sendPollTelegram is imported and registered in lazy providers (line ~31122 in reply-CrwRmeCr.js)
  • The function is complete and calls grammY api.sendPoll()

Steps to Reproduce

openclaw message poll --channel telegram --to <chat_id> --poll-question "Test" --poll-option "A" --poll-option "B"

Or via the message agent tool with action: "send" and poll parameters.

Expected Behavior

Poll should be sent to Telegram chat.

Actual Behavior

Error: Action poll is not supported for provider telegram

Suggested Fix

Either:

  1. Add a case "poll" to telegramMessageActions.handleAction that calls sendPollTelegram
  2. Or wire sendPollTelegram into the Telegram outbound object as outbound.sendPoll
  3. And optionally add supportsAction to return null for unhandled actions instead of throwing

Environment

  • OpenClaw: 2026.2.14 (c1feda1)
  • OS: macOS (arm64)
  • Node: v22.22.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions