mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
refactor(telegram): remove unused webhook callback helper (#27816)
This commit is contained in:
@@ -169,7 +169,6 @@ vi.mock("grammy", () => ({
|
||||
}
|
||||
},
|
||||
InputFile: class {},
|
||||
webhookCallback: vi.fn(),
|
||||
}));
|
||||
|
||||
const sequentializeMiddleware = vi.fn();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { sequentialize } from "@grammyjs/runner";
|
||||
import { apiThrottler } from "@grammyjs/transformer-throttler";
|
||||
import type { ApiClientOptions } from "grammy";
|
||||
import { Bot, webhookCallback } from "grammy";
|
||||
import { Bot } from "grammy";
|
||||
import { resolveDefaultAgentId } from "../agents/agent-scope.js";
|
||||
import { resolveTextChunkLimit } from "../auto-reply/chunk.js";
|
||||
import { DEFAULT_GROUP_HISTORY_LIMIT, type HistoryEntry } from "../auto-reply/reply/history.js";
|
||||
@@ -381,7 +381,3 @@ export function createTelegramBot(opts: TelegramBotOptions) {
|
||||
|
||||
return bot;
|
||||
}
|
||||
|
||||
export function createTelegramWebhookCallback(bot: Bot, path = "/telegram-webhook") {
|
||||
return { path, handler: webhookCallback(bot, "http") };
|
||||
}
|
||||
|
||||
@@ -163,7 +163,6 @@ vi.mock("./bot.js", () => ({
|
||||
start: vi.fn(),
|
||||
};
|
||||
},
|
||||
createTelegramWebhookCallback: vi.fn(),
|
||||
}));
|
||||
|
||||
// Mock the grammyjs/runner to resolve immediately
|
||||
|
||||
Reference in New Issue
Block a user