From dcba3e5699d1d6e0f1b5f4ced0b95dfef46ef281 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 16 Feb 2026 06:49:17 +0000 Subject: [PATCH] test: trim redundant telegram thread+reply combination checks --- src/telegram/send.test.ts | 48 --------------------------------------- 1 file changed, 48 deletions(-) diff --git a/src/telegram/send.test.ts b/src/telegram/send.test.ts index db51b2091..f4e184cb0 100644 --- a/src/telegram/send.test.ts +++ b/src/telegram/send.test.ts @@ -939,30 +939,6 @@ describe("sendMessageTelegram", () => { }); }); - it("includes both thread and reply params for forum topic replies", async () => { - const chatId = "-1001234567890"; - const sendMessage = vi.fn().mockResolvedValue({ - message_id: 57, - chat: { id: chatId }, - }); - const api = { sendMessage } as unknown as { - sendMessage: typeof sendMessage; - }; - - await sendMessageTelegram(chatId, "forum reply", { - token: "tok", - api, - messageThreadId: 271, - replyToMessageId: 500, - }); - - expect(sendMessage).toHaveBeenCalledWith(chatId, "forum reply", { - parse_mode: "HTML", - message_thread_id: 271, - reply_to_message_id: 500, - }); - }); - it("retries media sends without message_thread_id when thread is missing", async () => { const chatId = "123"; const threadErr = new Error("400: Bad Request: message thread not found"); @@ -1155,30 +1131,6 @@ describe("sendStickerTelegram", () => { }); }); - it("includes both thread and reply params for forum topic replies", async () => { - const chatId = "-1001234567890"; - const fileId = "CAACAgIAAxkBAAI...sticker_file_id"; - const sendSticker = vi.fn().mockResolvedValue({ - message_id: 103, - chat: { id: chatId }, - }); - const api = { sendSticker } as unknown as { - sendSticker: typeof sendSticker; - }; - - await sendStickerTelegram(chatId, fileId, { - token: "tok", - api, - messageThreadId: 271, - replyToMessageId: 500, - }); - - expect(sendSticker).toHaveBeenCalledWith(chatId, fileId, { - message_thread_id: 271, - reply_to_message_id: 500, - }); - }); - it("normalizes chat ids with internal prefixes", async () => { const sendSticker = vi.fn().mockResolvedValue({ message_id: 104,