From 001c524d7307088c9c52211d07edb0bd123a2234 Mon Sep 17 00:00:00 2001 From: Max Richter Date: Fri, 9 May 2025 19:57:18 +0200 Subject: [PATCH] fix: reply in html --- lib/telegram.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/telegram.ts b/lib/telegram.ts index 7454c05..a981eb5 100644 --- a/lib/telegram.ts +++ b/lib/telegram.ts @@ -2,6 +2,7 @@ import { Bot } from "https://deno.land/x/grammy@v1.36.1/mod.ts"; import { TELEGRAM_API_KEY } from "@lib/env.ts"; import { transcribe } from "@lib/openai.ts"; import { createDocument } from "@lib/documents.ts"; +import { renderMarkdown } from "@lib/documents.ts"; const bot = new Bot(TELEGRAM_API_KEY); @@ -81,7 +82,7 @@ bot.command("end", async (ctx) => { await createDocument(task.noteName, finalNote, "text/markdown"); delete activeTasks[ctx.chat.id.toString()]; await ctx.reply("Note complete. Here is your markdown:"); - await ctx.reply(finalNote, { parse_mode: "MarkdownV2" }); + await ctx.reply(renderMarkdown(finalNote), { parse_mode: "HTML" }); } catch (error) { console.error("Error creating document:", error); await ctx.reply("Error creating document:");