From 688de1053b0f625ee67f51c3632a6c882f692340 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Thu, 26 Mar 2020 14:13:00 +0600 Subject: [PATCH 1/3] started 0.25.1 --- CHANGELOG.md | 2 ++ gradle.properties | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc8de64214..26e833b5cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,8 @@ * `FlowsUpdatesFilter` now have two additional flows: `pollAnswerFlow`, `unknownUpdateTypeFlow` * `ExtendedUser` (`typealias`) was added as a `PreviewFeature` +### 0.25.1 + ## 0.24.0 * `TelegramBotAPI`: diff --git a/gradle.properties b/gradle.properties index a917de2714..76f90e5eba 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,6 +7,6 @@ uuid_version=0.1.0 ktor_version=1.3.2 library_group=com.github.insanusmokrassar -library_version=0.25.0 +library_version=0.25.1 gradle_bintray_plugin_version=1.8.4 From 3dd428c7d96e143607c84e7014b09d4ec20415c8 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Thu, 26 Mar 2020 14:26:44 +0600 Subject: [PATCH 2/3] fix of error inside of update utils for media groups --- CHANGELOG.md | 2 ++ .../extensions/api/InternalUtils/UpdatesUtils.kt | 16 ++++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26e833b5cd..1a81348ef4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,8 @@ ### 0.25.1 +* Fix of error inside of update utils for media groups + ## 0.24.0 * `TelegramBotAPI`: diff --git a/TelegramBotAPI-extensions-api/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/extensions/api/InternalUtils/UpdatesUtils.kt b/TelegramBotAPI-extensions-api/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/extensions/api/InternalUtils/UpdatesUtils.kt index b7eb65f209..a48d6695ee 100644 --- a/TelegramBotAPI-extensions-api/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/extensions/api/InternalUtils/UpdatesUtils.kt +++ b/TelegramBotAPI-extensions-api/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/extensions/api/InternalUtils/UpdatesUtils.kt @@ -23,19 +23,19 @@ internal fun List.convertWithMediaGroupUpdates(): List { val resultUpdates = mutableListOf() val mediaGroups = mutableMapOf>() for (update in this) { + val data = (update.data as? MediaGroupMessage) + if (data == null) { + resultUpdates.add(update) + continue + } when (update) { is BaseEditMessageUpdate -> resultUpdates.add( update.toEditMediaGroupUpdate() ) is BaseSentMessageUpdate -> { - val data = update.data - if (data is MediaGroupMessage) { - mediaGroups.getOrPut(data.mediaGroupId) { - mutableListOf() - }.add(update) - } else { - resultUpdates.add(update) - } + mediaGroups.getOrPut(data.mediaGroupId) { + mutableListOf() + }.add(update) } else -> resultUpdates.add(update) } From 97d6d3ad134501b106ed15336ef95e4c7686c7a9 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Thu, 26 Mar 2020 14:27:17 +0600 Subject: [PATCH 3/3] update kotlin --- CHANGELOG.md | 1 + gradle.properties | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a81348ef4..8b9334f267 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ ### 0.25.1 +* Update kotlin: `1.3.70` -> `1.3.71` * Fix of error inside of update utils for media groups ## 0.24.0 diff --git a/gradle.properties b/gradle.properties index 76f90e5eba..87bf45babc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ kotlin.code.style=official -kotlin_version=1.3.70 +kotlin_version=1.3.71 kotlin_coroutines_version=1.3.5 kotlin_serialisation_runtime_version=0.20.0 klock_version=1.10.0