diff --git a/CHANGELOG.md b/CHANGELOG.md index e4b61a23ff..eabd6a44c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,6 +61,7 @@ * `BasketballDiceAnimationType` was added * `UnknownDiceAnimationType` now is deprecated due to renaming - currently it is typealias for `CustomDiceAnimationType` * `CustomDiceAnimationType` now is `data` class instead of common class + * `FlowsUpdatesFilter` will use size 64 by default for internal broadcast channels * `TelegramBotAPI-extensions-api`: * Long Polling extensions now are deprecated in this project. It was replaced into `TelegramBotAPI-extensions-utils` * Several `telegramBot` functions was renamed into `telegramBotWithCustomClientConfig` diff --git a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/webhook/SetWebhook.kt b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/webhook/SetWebhook.kt index 703c6ac043..e662818d14 100644 --- a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/webhook/SetWebhook.kt +++ b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/webhook/SetWebhook.kt @@ -40,6 +40,7 @@ fun SetWebhook( allowedUpdates ) +@Suppress("USELESS_CAST") fun SetWebhook( url: String, certificate: InputFile, diff --git a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/FlowsUpdatesFilter.kt b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/FlowsUpdatesFilter.kt index ffde4ccb35..052e1a8f03 100644 --- a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/FlowsUpdatesFilter.kt +++ b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/FlowsUpdatesFilter.kt @@ -3,17 +3,16 @@ package com.github.insanusmokrassar.TelegramBotAPI.updateshandlers import com.github.insanusmokrassar.TelegramBotAPI.types.update.* import com.github.insanusmokrassar.TelegramBotAPI.types.update.MediaGroupUpdates.* import com.github.insanusmokrassar.TelegramBotAPI.types.update.abstracts.Update -import kotlinx.coroutines.FlowPreview import kotlinx.coroutines.channels.BroadcastChannel -import kotlinx.coroutines.channels.Channel import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.asFlow +@Suppress("EXPERIMENTAL_API_USAGE") private fun BroadcastChannel.createUpdateReceiver(): UpdateReceiver = ::send -@FlowPreview +@Suppress("EXPERIMENTAL_API_USAGE", "unused") class FlowsUpdatesFilter( - broadcastChannelsSize: Int = Channel.CONFLATED + broadcastChannelsSize: Int = 64 ): UpdatesFilter { private val messageChannel: BroadcastChannel = BroadcastChannel(broadcastChannelsSize) private val messageMediaGroupChannel: BroadcastChannel = BroadcastChannel(broadcastChannelsSize)