Suggest bot commands only in the start of the field.

This commit is contained in:
John Preston 2022-06-18 00:01:47 +04:00
parent 77330aa6a7
commit 5fe1988d0a

View file

@ -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);
}