From 00005141151b7ac2aa496948f6e35c1f96f97c21 Mon Sep 17 00:00:00 2001 From: niracler Date: Sat, 30 Nov 2024 15:05:46 +0800 Subject: [PATCH] chore: update telegramify-markdown --- package.json | 2 +- pnpm-lock.yaml | 28 +++++++--------------------- src/core/index.ts | 2 +- 3 files changed, 9 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index e206f9e..908607c 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,6 @@ "hono": "^4.6.5", "oauth-1.0a": "^2.2.6", "openai": "^4.66.1", - "telegramify-markdown": "git+ssh://git@github.com/niracler/telegramify-markdown.git#master" + "telegramify-markdown": "^1.2.2" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dc290b3..a0f8767 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -39,8 +39,8 @@ importers: specifier: ^4.66.1 version: 4.66.1(zod@3.23.8) telegramify-markdown: - specifier: git+ssh://git@github.com/niracler/telegramify-markdown.git#master - version: git+https://git@github.com:niracler/telegramify-markdown.git#10c641321ddd7777fcb11d0d560659f699932710 + specifier: ^1.2.2 + version: 1.2.2 devDependencies: '@cloudflare/workers-types': specifier: ^4.20240925.0 @@ -1357,15 +1357,6 @@ packages: supports-color: optional: true - debug@4.3.7: - resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - decamelize@1.2.0: resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} engines: {node: '>=0.10.0'} @@ -2883,9 +2874,8 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} - telegramify-markdown@git+https://git@github.com:niracler/telegramify-markdown.git#10c641321ddd7777fcb11d0d560659f699932710: - resolution: {commit: 10c641321ddd7777fcb11d0d560659f699932710, repo: git@github.com:niracler/telegramify-markdown.git, type: git} - version: 1.0.0 + telegramify-markdown@1.2.2: + resolution: {integrity: sha512-l6JYuOsVy6UtLtYo5XC6ids8lCKTxzFe179GfAED45j4//hrqH7s7a5VRT5xfZFv1qI9nYqe4l8MgVfXG+8LFw==} temp-dir@3.0.0: resolution: {integrity: sha512-nHc6S/bwIilKHNRgK/3jlhDoIHcp45YgyiwcAk46Tr0LfEqGBVpmiAyuiuxeVE44m3mXnEeVhaipLOEWmH+Njw==} @@ -4244,10 +4234,6 @@ snapshots: dependencies: ms: 2.1.2 - debug@4.3.7: - dependencies: - ms: 2.1.3 - decamelize@1.2.0: {} decode-named-character-reference@1.0.2: @@ -5244,7 +5230,7 @@ snapshots: micromark@2.11.4: dependencies: - debug: 4.3.7 + debug: 4.3.4 parse-entities: 2.0.0 transitivePeerDependencies: - supports-color @@ -5252,7 +5238,7 @@ snapshots: micromark@3.2.0: dependencies: '@types/debug': 4.1.12 - debug: 4.3.7 + debug: 4.3.4 decode-named-character-reference: 1.0.2 micromark-core-commonmark: 1.1.0 micromark-factory-space: 1.1.0 @@ -5824,7 +5810,7 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - telegramify-markdown@git+https://git@github.com:niracler/telegramify-markdown.git#10c641321ddd7777fcb11d0d560659f699932710: + telegramify-markdown@1.2.2: dependencies: mdast-util-gfm-table: 1.0.7 mdast-util-to-markdown: 0.6.5 diff --git a/src/core/index.ts b/src/core/index.ts index f8c761c..fd31fcc 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -46,7 +46,7 @@ async function sendReplyToTelegram(chatId: number, text: string, messageId: numb if (!text) return; const bot = new Bot(env.TELEGRAM_BOT_SECRET); try { - await bot.api.sendMessage(chatId, telegramifyMarkdown(text), { + await bot.api.sendMessage(chatId, telegramifyMarkdown(text, "keep"), { reply_to_message_id: messageId, parse_mode: 'MarkdownV2', });