1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-26 12:08:43 +00:00

fixes in calling of "asUpdate"

This commit is contained in:
InsanusMokrassar 2020-01-23 04:01:24 +06:00
parent f4fe680cac
commit 8487ee1f31
2 changed files with 5 additions and 5 deletions

View File

@ -36,7 +36,7 @@ internal object UpdateDeserializationStrategy : DeserializationStrategy<Update>
RawUpdate.serializer(), RawUpdate.serializer(),
asJson asJson
).asUpdate( ).asUpdate(
asJson.toString() asJson
) )
} }
} }

View File

@ -73,12 +73,12 @@ suspend fun RequestsExecutor.setWebhook(
module { module {
routing { routing {
post(listenRoute) { post(listenRoute) {
val deserialized = call.receiveText() val asJson = Json.nonstrict.parseJson(call.receiveText())
val update = Json.nonstrict.parse( val update = Json.nonstrict.fromJson(
RawUpdate.serializer(), RawUpdate.serializer(),
deserialized asJson
) )
updatesChannel.send(update.asUpdate(deserialized)) updatesChannel.send(update.asUpdate(asJson))
call.respond("Ok") call.respond("Ok")
} }
} }