feat(telegram): add sendPoll support

This commit is contained in:
Robby (AI-assisted)
2026-02-14 16:17:09 +00:00
committed by Peter Steinberger
parent fc5d147d1b
commit 08da8e00bf
5 changed files with 131 additions and 2 deletions

View File

@@ -96,6 +96,7 @@ export const telegramPlugin: ChannelPlugin<ResolvedTelegramAccount, TelegramProb
reactions: true,
threads: true,
media: true,
polls: true,
nativeCommands: true,
blockStreaming: true,
},
@@ -273,6 +274,7 @@ export const telegramPlugin: ChannelPlugin<ResolvedTelegramAccount, TelegramProb
chunker: (text, limit) => getTelegramRuntime().channel.text.chunkMarkdownText(text, limit),
chunkerMode: "markdown",
textChunkLimit: 4000,
pollMaxOptions: 10,
sendText: async ({ to, text, accountId, deps, replyToId, threadId }) => {
const send = deps?.sendTelegram ?? getTelegramRuntime().channel.telegram.sendMessageTelegram;
const replyToMessageId = parseReplyToMessageId(replyToId);
@@ -298,6 +300,10 @@ export const telegramPlugin: ChannelPlugin<ResolvedTelegramAccount, TelegramProb
});
return { channel: "telegram", ...result };
},
sendPoll: async ({ to, poll, accountId }) =>
await getTelegramRuntime().channel.telegram.sendPollTelegram(to, poll, {
accountId: accountId ?? undefined,
}),
},
status: {
defaultRuntime: {