mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 15:04:33 +00:00
Revert "Fix Telegram poll action wiring"
This reverts commit 556b531a14.
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user