diff --git a/package.json b/package.json index ea26809..32b3d8c 100644 --- a/package.json +++ b/package.json @@ -41,8 +41,8 @@ "highlight.js": "11.12.0", "lottie-web": "5.13.0", "markdown-it": "15.0.0", - "mermaid": "11.17.0", - "node-telegram-bot-api": "2.0.0", + "mermaid": "11.17.1", + "node-telegram-bot-api": "2.1.0", "pinia": "4.0.3", "quasar": "2.26.0", "vue": "3.5.41", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4e6ae7b..dc63e30 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -47,11 +47,11 @@ importers: specifier: 15.0.0 version: 15.0.0 mermaid: - specifier: 11.17.0 - version: 11.17.0 + specifier: 11.17.1 + version: 11.17.1 node-telegram-bot-api: - specifier: 2.0.0 - version: 2.0.0 + specifier: 2.1.0 + version: 2.1.0 pinia: specifier: 4.0.3 version: 4.0.3(@vue/devtools-api@8.2.1)(typescript@6.0.3)(vue@3.5.41(typescript@6.0.3)) @@ -1419,8 +1419,8 @@ packages: '@types/d3-selection@3.0.11': resolution: {integrity: sha512-bhAXu23DJWsrI45xafYpkQ4NtcKMwWnAC/vKrd2l+nxMFuvOT3XMYTIj2opv8vq8AO5Yh7Qac/nSeP/3zjTK0w==} - '@types/d3-shape@3.1.8': - resolution: {integrity: sha512-lae0iWfcDeR7qt7rA88BNiqdvPS5pFVPpo5OfjElwNaT2yyekbM0C9vK+yqBqEmHr6lDkRnYNoTBYlAgJa7a4w==} + '@types/d3-shape@3.2.0': + resolution: {integrity: sha512-kVd74ta9eof3eJOvbNd1vGKS/XERRyQbT26Og63hIsvDO84cjD5gEOhsXf26w3FSoNlPVz84DOFcKv/oou+fMw==} '@types/d3-time-format@4.0.3': resolution: {integrity: sha512-5xg9rC+wWL8kdDj153qZcsJ0FWiFt0J5RB6LYUNZjwSnesfblqrI/bJ1wBdJ8OQfncgbJG5+2F+qfqnqyzYxyg==} @@ -2946,8 +2946,8 @@ packages: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} - mermaid@11.17.0: - resolution: {integrity: sha512-Jo9N377Wb4MSnHFPTbLi2SxFpsQl4eVHoxnW5U1Md9EazvgMp3s+4ohDxr81YNTgbn5Kj7HJ3yslrSJ52kwpbA==} + mermaid@11.17.1: + resolution: {integrity: sha512-G1BP6qU4BRwEGk2SdsxgDk1cSuApimT32Nkb52YRSv+856FrmB8qo28BaNk9Ee8Fvuon3OxpXDJ4L6cD5AykXg==} micromark-util-character@2.1.1: resolution: {integrity: sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==} @@ -3026,8 +3026,8 @@ packages: resolution: {integrity: sha512-D9UOmYG3UH1V+ENW56t5QXBwJw1YEY18ruVeus89Rw+SyIgjPkCO84bRzO3uNIYosJbNwiabWVn48o3uJLjxFQ==} engines: {node: '>=18'} - node-telegram-bot-api@2.0.0: - resolution: {integrity: sha512-Gqo1HNYkIfYnHy25rEMKFFMVLqG+EUmH+C5HLsOguXi4WazaGWwIu9vigMLARv+cKONdU6x9Fj4lKNBLf7h/Uw==} + node-telegram-bot-api@2.1.0: + resolution: {integrity: sha512-IXWp7Qzhwv21DqTw0g1CcppTb4TCzrQ949RVdtAmgiHAu3KbcRPyCAFXLaFAViqWDVx8GLZjnWiWJ7pWSj2PRA==} engines: {node: '>=18'} nostics@1.2.0: @@ -5261,7 +5261,7 @@ snapshots: '@types/d3-selection@3.0.11': {} - '@types/d3-shape@3.1.8': + '@types/d3-shape@3.2.0': dependencies: '@types/d3-path': 3.1.1 @@ -5306,7 +5306,7 @@ snapshots: '@types/d3-scale': 4.0.9 '@types/d3-scale-chromatic': 3.1.0 '@types/d3-selection': 3.0.11 - '@types/d3-shape': 3.1.8 + '@types/d3-shape': 3.2.0 '@types/d3-time': 3.0.4 '@types/d3-time-format': 4.0.3 '@types/d3-timer': 3.0.2 @@ -6913,7 +6913,7 @@ snapshots: merge2@1.4.1: {} - mermaid@11.17.0: + mermaid@11.17.1: dependencies: '@braintree/sanitize-url': 7.1.2 '@iconify/utils': 3.1.4 @@ -7005,7 +7005,7 @@ snapshots: node-releases@2.0.53: {} - node-telegram-bot-api@2.0.0: {} + node-telegram-bot-api@2.1.0: {} nostics@1.2.0: {} diff --git a/server/passerelle/telegram.ts b/server/passerelle/telegram.ts index 13cc094..564f1f3 100644 --- a/server/passerelle/telegram.ts +++ b/server/passerelle/telegram.ts @@ -18,7 +18,7 @@ // `guard.ts` n'a rien de nouveau à trancher. Aucun port ne s'ouvre pour ceci. import { Api, Bot } from 'node-telegram-bot-api' -import type { InlineKeyboardMarkup, InputRichBlock as InputRichBlockLib } from 'node-telegram-bot-api' +import type { InlineKeyboardMarkup } from 'node-telegram-bot-api' import { MAX_RICHE, type InputRichBlock } from './riche.ts' /** Ce qu'un message ordinaire accepte. Le riche en prend huit fois plus. */ @@ -327,10 +327,7 @@ export class Telegram { await this.api.sendRichMessage({ chat_id: chatId, rich_message: { - // Même conversion que `brouillon`, et pour la même raison : le - // `RichText` de la bibliothèque n'admet pas la chaîne nue, que l'API - // accepte pourtant — sans quoi aucun titre simple ne serait exprimable. - blocks: [{ type: 'details', summary: titre, blocks: blocs }] as unknown as InputRichBlockLib[], + blocks: [{ type: 'details', summary: titre, blocks: blocs }], skip_entity_detection: true, }, }) @@ -504,11 +501,7 @@ export class Telegram { chat_id: chatId, draft_id: draftId, rich_message: { - // La première des deux corrections de `riche.ts` : le `RichText` de la - // bibliothèque n'admet pas la chaîne nue, que l'API accepte pourtant - // — sans quoi aucun texte simple ne serait exprimable. La conversion - // ne porte que sur ce point-là. - blocks: [{ type: 'thinking', text: texte } as unknown as InputRichBlockLib], + blocks: [{ type: 'thinking', text: texte }], skip_entity_detection: true, }, })