From 337f066fe6f1ed801374a7256469674c5e770d23 Mon Sep 17 00:00:00 2001 From: Eduard Kuzmenko Date: Fri, 18 Jun 2021 20:01:30 +0300 Subject: [PATCH] Fix parsing bot commands --- src/lib/richtextprocessor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/richtextprocessor.ts b/src/lib/richtextprocessor.ts index 63d8fa3d..74ac1252 100644 --- a/src/lib/richtextprocessor.ts +++ b/src/lib/richtextprocessor.ts @@ -217,7 +217,7 @@ namespace RichTextProcessor { } else if(match[13]) { // Bot command entities.push({ _: 'messageEntityBotCommand', - offset: matchIndex + (match[11] ? match[11].length : 0), + offset: matchIndex + (match[11] ? match[11].length : 0) + (match[12] ? match[12].length : 0), length: 1 + match[13].length + (match[14] ? 1 + match[14].length : 0), unsafe: true });