mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-12-23 00:57:13 +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 {
|
||||
pushMediaGroupUpdate(it)
|
||||
if (it.data is MediaGroupMessage) {
|
||||
pushMediaGroupUpdate(it)
|
||||
} else {
|
||||
null
|
||||
}
|
||||
} ?:let {
|
||||
pushMediaGroupUpdate()
|
||||
sendToBlock(update)
|
||||
|
Loading…
Reference in New Issue
Block a user