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:
parent
f4fe680cac
commit
8487ee1f31
@ -36,7 +36,7 @@ internal object UpdateDeserializationStrategy : DeserializationStrategy<Update>
|
||||
RawUpdate.serializer(),
|
||||
asJson
|
||||
).asUpdate(
|
||||
asJson.toString()
|
||||
asJson
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user