mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-06-03 00:15:27 +00:00
11 lines
370 B
Kotlin
11 lines
370 B
Kotlin
|
package dev.inmo.tgbotapi.utils
|
||
|
|
||
|
import io.ktor.utils.io.ByteReadChannel
|
||
|
import io.ktor.utils.io.core.Input
|
||
|
import io.ktor.utils.io.jvm.javaio.toInputStream
|
||
|
import io.ktor.utils.io.streams.asInput
|
||
|
import kotlinx.coroutines.job
|
||
|
import kotlin.coroutines.coroutineContext
|
||
|
|
||
|
actual suspend fun ByteReadChannel.asInput(): Input = toInputStream(coroutineContext.job).asInput()
|