diff options
| author | Dhravya Shah <[email protected]> | 2024-08-27 11:28:06 -0700 |
|---|---|---|
| committer | Dhravya Shah <[email protected]> | 2024-08-27 11:28:06 -0700 |
| commit | 48b9c879c90e054fd21ca6092d755348c1f062dd (patch) | |
| tree | 67cc4b8466c04fd97c761ccf5c0e457f9c3b474f /apps/web/app/api | |
| parent | aaa (diff) | |
| parent | Merge pull request #268 from supermemoryai/CodeTorso-main (diff) | |
| download | archived-supermemory-48b9c879c90e054fd21ca6092d755348c1f062dd.tar.xz archived-supermemory-48b9c879c90e054fd21ca6092d755348c1f062dd.zip | |
Merge branch 'main' of github.com:supermemoryai/supermemory
Diffstat (limited to 'apps/web/app/api')
| -rw-r--r-- | apps/web/app/api/telegram/route.ts | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/apps/web/app/api/telegram/route.ts b/apps/web/app/api/telegram/route.ts index c629e409..20241611 100644 --- a/apps/web/app/api/telegram/route.ts +++ b/apps/web/app/api/telegram/route.ts @@ -21,7 +21,10 @@ bot.command("start", async (ctx) => { const cipherd = cipher(user.id.toString()); await ctx.reply( - `Welcome to Supermemory bot. I am here to help you remember things better. Click here to create and link your account: https://supermemory.ai/signin?telegramUser=${cipherd}`, + `Welcome to Supermemory bot. I am here to help you remember things better. [Click here to create and link your account](https://supermemory.ai/signin?telegramUser=${cipherd})`, + { + parse_mode: "MarkdownV2", + }, ); }); @@ -38,7 +41,10 @@ bot.on("message", async (ctx) => { if (!dbUser) { await ctx.reply( - `Welcome to Supermemory bot. I am here to help you remember things better. Click here to create and link your account: https://supermemory.ai/signin?telegramUser=${cipherd}`, + `Welcome to Supermemory bot. I am here to help you remember things better. [Click here to create and link your account](https://supermemory.ai/signin?telegramUser=${cipherd})`, + { + parse_mode: "MarkdownV2", + }, ); return; @@ -103,7 +109,14 @@ bot.on("message", async (ctx) => { .returning({ id: storedContent.id }); } - await ctx.api.editMessageText(ctx.chat.id, message.message_id, data.response); + await ctx.api.editMessageText( + ctx.chat.id, + message.message_id, + data.response, + { + parse_mode: "MarkdownV2", + }, + ); }); export const POST = webhookCallback(bot, "std/http"); |