← Back to PRs

#22690: fix: wire up Telegram poll action in provider dispatch

by sleitor open 2026-02-21 14:24 View on GitHub →
agents size: S
The `sendPollTelegram()` implementation is fully functional but unreachable because the Telegram provider's action dispatcher doesn't include a `poll` case. This adds poll handling to both dispatch layers. **Changes:** - `src/channels/plugins/actions/telegram.ts` — Add `poll` case to the channel plugin action handler - `src/agents/tools/telegram-actions.ts` — Add `sendPoll` action calling the existing `sendPollTelegram()` Supports all poll parameters: question, options, multi-select, duration, anonymous flag, silent mode, and forum topic threading. Closes #22422 <!-- greptile_comment --> <h3>Greptile Summary</h3> This PR wires up the poll action to make the existing `sendPollTelegram()` implementation reachable through both the channel plugin and agent tool layers. The type definition for `sendPoll` was successfully added to `TelegramActionConfig`. **Critical issues:** - `durationHours` parameter on line 250 will cause runtime errors - `handleTelegramAction` explicitly rejects this parameter (src/telegram/send.ts:1035-1038) - `poll` action is missing from `listActions()` registration - users cannot discover or use this action even though the implementation exists These issues were identified in previous review threads but remain unresolved. <h3>Confidence Score: 2/5</h3> - This PR has critical issues that will cause runtime errors and incomplete functionality - The implementation includes `durationHours` parameter (line 250) that will be rejected by the action handler, causing runtime errors. Additionally, the `poll` action is not registered in `listActions`, making it unavailable to users even though the functionality exists. These are the same issues identified in previous review threads that remain unaddressed. - src/channels/plugins/actions/telegram.ts requires attention - remove `durationHours` parameter and add `poll` to `listActions` <sub>Last reviewed commit: c24da24</sub> <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs