From 5fe1988d0a5a092f75710b207c19a06e3c3b2faf Mon Sep 17 00:00:00 2001 From: John Preston Date: Sat, 18 Jun 2022 00:01:47 +0400 Subject: [PATCH] Suggest bot commands only in the start of the field. --- Telegram/SourceFiles/chat_helpers/message_field.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/chat_helpers/message_field.cpp b/Telegram/SourceFiles/chat_helpers/message_field.cpp index ff386a1f1..6b9cf7e0b 100644 --- a/Telegram/SourceFiles/chat_helpers/message_field.cpp +++ b/Telegram/SourceFiles/chat_helpers/message_field.cpp @@ -470,7 +470,7 @@ AutocompleteQuery ParseMentionHashtagBotCommandQuery( } return result; } else if (text[i - 1] == '/') { - if (i < 2) { + if (i < 2 && !fragmentPosition) { result.fromStart = (i == 1) && (fragmentPosition == 0); result.query = text.mid(i - 1, position - fragmentPosition - i + 1); }