mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 01:03:29 +00:00
Handle Telegram poll vote updates for agent context
This commit is contained in:
@@ -27,6 +27,7 @@ import { splitTelegramCaption } from "./caption.js";
|
||||
import { resolveTelegramFetch } from "./fetch.js";
|
||||
import { renderTelegramHtmlText } from "./format.js";
|
||||
import { isRecoverableTelegramNetworkError } from "./network-errors.js";
|
||||
import { recordSentPoll } from "./poll-vote-cache.js";
|
||||
import { makeProxyFetch } from "./proxy.js";
|
||||
import { recordSentMessage } from "./sent-message-cache.js";
|
||||
import { parseTelegramTarget, stripTelegramInternalPrefixes } from "./targets.js";
|
||||
@@ -1055,6 +1056,15 @@ export async function sendPollTelegram(
|
||||
if (result?.message_id) {
|
||||
recordSentMessage(chatId, result.message_id);
|
||||
}
|
||||
if (pollId) {
|
||||
recordSentPoll({
|
||||
pollId,
|
||||
chatId: resolvedChatId,
|
||||
question: normalizedPoll.question,
|
||||
options: normalizedPoll.options,
|
||||
accountId: account.accountId,
|
||||
});
|
||||
}
|
||||
|
||||
recordChannelActivity({
|
||||
channel: "telegram",
|
||||
|
||||
Reference in New Issue
Block a user