1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-26 03:58:44 +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(),
asJson
).asUpdate(
asJson.toString()
asJson
)
}
}

View File

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