mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-15 21:03:48 +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(),
|
RawUpdate.serializer(),
|
||||||
asJson
|
asJson
|
||||||
).asUpdate(
|
).asUpdate(
|
||||||
asJson.toString()
|
asJson
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user