mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 08:13:47 +00:00
rewrite handleUpdates
This commit is contained in:
parent
7d1871d8dc
commit
ac5d3214b4
@ -56,9 +56,13 @@ class UpdatesPoller(
|
||||
}
|
||||
|
||||
private suspend fun handleUpdates(updates: List<Update>) {
|
||||
updates.forEach { update ->
|
||||
for (update in updates) {
|
||||
(update as? BaseMessageUpdate) ?.let {
|
||||
if (it.data is MediaGroupMessage) {
|
||||
pushMediaGroupUpdate(it)
|
||||
} else {
|
||||
null
|
||||
}
|
||||
} ?:let {
|
||||
pushMediaGroupUpdate()
|
||||
sendToBlock(update)
|
||||
|
Loading…
Reference in New Issue
Block a user