mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-12-27 02:57:13 +00:00
add subcondition for adding subparts in raw message entities
This commit is contained in:
parent
72127ce133
commit
b095f07b9c
@ -39,7 +39,7 @@ internal fun RawMessageEntity.asTextParts(source: String, subParts: List<TextPar
|
||||
else -> RegularTextSource(sourceSubstring)
|
||||
}.let {
|
||||
val part = TextPart(range, it)
|
||||
if (it !is MultilevelTextSource) {
|
||||
if (it !is MultilevelTextSource && subParts.isNotEmpty()) {
|
||||
(subParts + part).sortedBy { currentPart -> currentPart.range.first }
|
||||
} else {
|
||||
listOf(part)
|
||||
|
Loading…
Reference in New Issue
Block a user