mirror of
				https://github.com/InsanusMokrassar/TelegramBotAPI.git
				synced 2025-11-04 06:00:15 +00:00 
			
		
		
		
	fix in updates unique calculation and update dependencies
This commit is contained in:
		@@ -6,7 +6,8 @@ _This update brings experimental support of `linuxX64` and `mingwX64` platforms_
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
* `Versions`:
 | 
					* `Versions`:
 | 
				
			||||||
    * `Kotlin`: `1.8.10` -> `1.8.20`
 | 
					    * `Kotlin`: `1.8.10` -> `1.8.20`
 | 
				
			||||||
    * `MicroUtils`: `0.17.5` -> `0.17.6`
 | 
					    * `MicroUtils`: `0.17.5` -> `0.17.8`
 | 
				
			||||||
 | 
					    * `Ktor`: `2.2.4` -> `2.3.0`
 | 
				
			||||||
* `Core`:
 | 
					* `Core`:
 | 
				
			||||||
    * New `RequestsExecutor` - `MultipleClientKtorRequestsExecutor`
 | 
					    * New `RequestsExecutor` - `MultipleClientKtorRequestsExecutor`
 | 
				
			||||||
    * Old `KtorRequestsExecutor` has been renamed to `DefaultKtorRequestsExecutor`
 | 
					    * Old `KtorRequestsExecutor` has been renamed to `DefaultKtorRequestsExecutor`
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8,12 +8,12 @@ javax-activation = "1.1.1"
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
korlibs = "3.4.0"
 | 
					korlibs = "3.4.0"
 | 
				
			||||||
uuid = "0.7.0"
 | 
					uuid = "0.7.0"
 | 
				
			||||||
ktor = "2.2.4"
 | 
					ktor = "2.3.0"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ksp = "1.8.20-1.0.11"
 | 
					ksp = "1.8.20-1.0.11"
 | 
				
			||||||
kotlin-poet = "1.13.0"
 | 
					kotlin-poet = "1.13.0"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
microutils = "0.17.6"
 | 
					microutils = "0.17.8"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
github-release-plugin = "2.4.1"
 | 
					github-release-plugin = "2.4.1"
 | 
				
			||||||
dokka = "1.8.10"
 | 
					dokka = "1.8.10"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -76,11 +76,14 @@ class DefaultBehaviourContext(
 | 
				
			|||||||
            (it + upstreamUpdatesFlow).filter {
 | 
					            (it + upstreamUpdatesFlow).filter {
 | 
				
			||||||
                val passed = handledUpdates.add(it.updateId)
 | 
					                val passed = handledUpdates.add(it.updateId)
 | 
				
			||||||
                (passed).also { passed ->
 | 
					                (passed).also { passed ->
 | 
				
			||||||
 | 
					                    val needToDropCount = handledUpdates.size - broadcastChannelsSize
 | 
				
			||||||
 | 
					                    if (needToDropCount > 0) {
 | 
				
			||||||
                        handledUpdates.removeAll(
 | 
					                        handledUpdates.removeAll(
 | 
				
			||||||
                        handledUpdates.take(handledUpdates.size - broadcastChannelsSize).ifEmpty { return@also }
 | 
					                            handledUpdates.take(needToDropCount).ifEmpty { return@also }
 | 
				
			||||||
                        )
 | 
					                        )
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            it
 | 
					            it
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user