mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 16:23:48 +00:00
commit
b7ec2f2b86
@ -25,6 +25,11 @@
|
|||||||
* `FlowsUpdatesFilter` now have two additional flows: `pollAnswerFlow`, `unknownUpdateTypeFlow`
|
* `FlowsUpdatesFilter` now have two additional flows: `pollAnswerFlow`, `unknownUpdateTypeFlow`
|
||||||
* `ExtendedUser` (`typealias`) was added as a `PreviewFeature`
|
* `ExtendedUser` (`typealias`) was added as a `PreviewFeature`
|
||||||
|
|
||||||
|
### 0.25.1
|
||||||
|
|
||||||
|
* Update kotlin: `1.3.70` -> `1.3.71`
|
||||||
|
* Fix of error inside of update utils for media groups
|
||||||
|
|
||||||
## 0.24.0
|
## 0.24.0
|
||||||
|
|
||||||
* `TelegramBotAPI`:
|
* `TelegramBotAPI`:
|
||||||
|
@ -23,19 +23,19 @@ internal fun List<Update>.convertWithMediaGroupUpdates(): List<Update> {
|
|||||||
val resultUpdates = mutableListOf<Update>()
|
val resultUpdates = mutableListOf<Update>()
|
||||||
val mediaGroups = mutableMapOf<MediaGroupIdentifier, MutableList<BaseSentMessageUpdate>>()
|
val mediaGroups = mutableMapOf<MediaGroupIdentifier, MutableList<BaseSentMessageUpdate>>()
|
||||||
for (update in this) {
|
for (update in this) {
|
||||||
|
val data = (update.data as? MediaGroupMessage)
|
||||||
|
if (data == null) {
|
||||||
|
resultUpdates.add(update)
|
||||||
|
continue
|
||||||
|
}
|
||||||
when (update) {
|
when (update) {
|
||||||
is BaseEditMessageUpdate -> resultUpdates.add(
|
is BaseEditMessageUpdate -> resultUpdates.add(
|
||||||
update.toEditMediaGroupUpdate()
|
update.toEditMediaGroupUpdate()
|
||||||
)
|
)
|
||||||
is BaseSentMessageUpdate -> {
|
is BaseSentMessageUpdate -> {
|
||||||
val data = update.data
|
mediaGroups.getOrPut(data.mediaGroupId) {
|
||||||
if (data is MediaGroupMessage) {
|
mutableListOf()
|
||||||
mediaGroups.getOrPut(data.mediaGroupId) {
|
}.add(update)
|
||||||
mutableListOf()
|
|
||||||
}.add(update)
|
|
||||||
} else {
|
|
||||||
resultUpdates.add(update)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else -> resultUpdates.add(update)
|
else -> resultUpdates.add(update)
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
kotlin.code.style=official
|
kotlin.code.style=official
|
||||||
kotlin_version=1.3.70
|
kotlin_version=1.3.71
|
||||||
kotlin_coroutines_version=1.3.5
|
kotlin_coroutines_version=1.3.5
|
||||||
kotlin_serialisation_runtime_version=0.20.0
|
kotlin_serialisation_runtime_version=0.20.0
|
||||||
klock_version=1.10.0
|
klock_version=1.10.0
|
||||||
@ -7,6 +7,6 @@ uuid_version=0.1.0
|
|||||||
ktor_version=1.3.2
|
ktor_version=1.3.2
|
||||||
|
|
||||||
library_group=com.github.insanusmokrassar
|
library_group=com.github.insanusmokrassar
|
||||||
library_version=0.25.0
|
library_version=0.25.1
|
||||||
|
|
||||||
gradle_bintray_plugin_version=1.8.4
|
gradle_bintray_plugin_version=1.8.4
|
||||||
|
Loading…
Reference in New Issue
Block a user