diff --git a/CHANGELOG.md b/CHANGELOG.md index 04557fef4e..0215dfaec7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## 0.34.1 +* `Core` + * Fix in creating of text sources list + ## 0.34.0 **UPDATE UP TO Telegram Bot API 5.2** diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/MessageEntity/RawMessageEntity.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/MessageEntity/RawMessageEntity.kt index 4234bdd191..c294fcbafb 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/MessageEntity/RawMessageEntity.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/MessageEntity/RawMessageEntity.kt @@ -59,7 +59,7 @@ internal fun List.fillWithRegulars(source: String): List val textSource = get(i) val thisSourceInStart = source.startsWith(textSource.source, index) if (!thisSourceInStart) { - val regularEndIndex = source.indexOf(textSource.source) + val regularEndIndex = source.indexOf(textSource.source, index) result.add(regular(source.substring(index, regularEndIndex))) index = regularEndIndex }