refactor(telegram): remove unused webhook callback helper (#27816)

This commit is contained in:
Harold Hunt
2026-03-04 23:40:09 -05:00
committed by GitHub
parent cc5dad81bc
commit 4bd3469324
3 changed files with 1 additions and 7 deletions

View File

@@ -169,7 +169,6 @@ vi.mock("grammy", () => ({
}
},
InputFile: class {},
webhookCallback: vi.fn(),
}));
const sequentializeMiddleware = vi.fn();

View File

@@ -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") };
}

View File

@@ -163,7 +163,6 @@ vi.mock("./bot.js", () => ({
start: vi.fn(),
};
},
createTelegramWebhookCallback: vi.fn(),
}));
// Mock the grammyjs/runner to resolve immediately