mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-26 20:38:38 +00:00
fix(telegram): wire sendPollTelegram into channel action handler (#16977)
The Telegram channel adapter listed no 'poll' action, so agents could not create polls via the unified action interface. The underlying sendPollTelegram function was already implemented but unreachable. Changes: - telegram.ts: add 'poll' to listActions (enabled by default via gate), add handleAction branch that reads pollQuestion/pollOption params and delegates to handleTelegramAction with action 'sendPoll'. - telegram-actions.ts: add 'sendPoll' handler that validates question, options (≥2), and forwards to sendPollTelegram with threading, silent, and anonymous options. - actions.test.ts: add test verifying poll action routes correctly. Fixes #16977
This commit is contained in:
committed by
Peter Steinberger
parent
068b9c9749
commit
7bb9a7dcfc
@@ -18,6 +18,8 @@ export type TelegramActionConfig = {
|
||||
polls?: boolean;
|
||||
deleteMessage?: boolean;
|
||||
editMessage?: boolean;
|
||||
/** Enable poll actions (sendPoll). */
|
||||
poll?: boolean;
|
||||
/** Enable sticker actions (send and search). */
|
||||
sticker?: boolean;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user