fix: telegram html formatting (#435, thanks @RandyVentures)

This commit is contained in:
Peter Steinberger
2026-01-08 02:34:32 +01:00
parent 61f5ed8bb7
commit 2140caaf67
8 changed files with 230 additions and 23 deletions

View File

@@ -51,7 +51,7 @@ vi.mock("./bot.js", () => ({
const text = ctx.message.text ?? ctx.message.caption ?? "";
if (isGroup && !text.includes("@mybot")) return;
if (!text.trim()) return;
await api.sendMessage(chatId, `echo:${text}`, { parse_mode: "Markdown" });
await api.sendMessage(chatId, `echo:${text}`, { parse_mode: "HTML" });
};
return {
on: vi.fn(),
@@ -102,7 +102,7 @@ describe("monitorTelegramProvider (grammY)", () => {
getFile: vi.fn(async () => ({})),
});
expect(api.sendMessage).toHaveBeenCalledWith(123, "echo:hi", {
parse_mode: "Markdown",
parse_mode: "HTML",
});
});