diff --git a/src/main.ts b/src/main.ts index d1a594a..eaba68e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -7,6 +7,7 @@ import { import { config } from "../config.ts"; import { callOpenAiAPI } from "./openai.js"; +import { convertMarkdownToHtml } from "./markdownToHtmlHelper.ts"; const { homeserverUrl, @@ -51,6 +52,8 @@ async function handleCommand(roomId: string, event: Event) { bearer: openaiApiKey, }); + const htmlResponse = convertMarkdownToHtml(responseFromAi); + await client.setTyping(roomId, false); - await client.replyNotice(roomId, event, responseFromAi); + await client.sendHtmlText(roomId, htmlResponse); }