mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 16:23:48 +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>) {
|
private suspend fun handleUpdates(updates: List<Update>) {
|
||||||
updates.forEach { update ->
|
for (update in updates) {
|
||||||
(update as? BaseMessageUpdate) ?.let {
|
(update as? BaseMessageUpdate) ?.let {
|
||||||
|
if (it.data is MediaGroupMessage) {
|
||||||
pushMediaGroupUpdate(it)
|
pushMediaGroupUpdate(it)
|
||||||
|
} else {
|
||||||
|
null
|
||||||
|
}
|
||||||
} ?:let {
|
} ?:let {
|
||||||
pushMediaGroupUpdate()
|
pushMediaGroupUpdate()
|
||||||
sendToBlock(update)
|
sendToBlock(update)
|
||||||
|
Loading…
Reference in New Issue
Block a user