Revert "Fix Telegram poll action wiring"

This reverts commit 556b531a14.
This commit is contained in:
Nimrod Gutman
2026-02-17 09:43:57 +02:00
parent b2fef5ebc4
commit 33b59441d2
5 changed files with 8 additions and 177 deletions

View File

@@ -142,43 +142,6 @@ describe("discord message actions", () => {
});
});
describe("telegram message actions", () => {
it("lists poll action when telegram is configured", () => {
const cfg = { channels: { telegram: { botToken: "t0" } } } as OpenClawConfig;
const actions = telegramMessageActions.listActions?.({ cfg }) ?? [];
expect(actions).toContain("poll");
});
it("routes poll with normalized params", async () => {
await telegramMessageActions.handleAction?.({
channel: "telegram",
action: "poll",
params: {
to: "123",
pollQuestion: "Ready?",
pollOption: ["Yes", "No"],
pollMulti: true,
pollDurationSeconds: 60,
},
cfg: { channels: { telegram: { botToken: "tok" } } } as OpenClawConfig,
accountId: "ops",
});
expect(handleTelegramAction).toHaveBeenCalledWith(
expect.objectContaining({
action: "poll",
to: "123",
question: "Ready?",
options: ["Yes", "No"],
allowMultiselect: true,
durationSeconds: 60,
accountId: "ops",
}),
expect.any(Object),
);
});
});
describe("handleDiscordMessageAction", () => {
it("forwards context accountId for send", async () => {
await handleDiscordMessageAction({