mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-03 07:09:23 +00:00
warnings fixes
This commit is contained in:
@@ -85,7 +85,7 @@ fun Poll.createRequest(
|
||||
correctOptionId,
|
||||
isAnonymous,
|
||||
isClosed,
|
||||
caption ?.fullListOfSubSource(captionEntities) ?.justTextSources() ?.toMarkdownV2Captions() ?.firstOrNull(),
|
||||
explanation ?.fullListOfSubSource(explanationEntities) ?.justTextSources() ?.toMarkdownV2Captions() ?.firstOrNull(),
|
||||
MarkdownV2,
|
||||
scheduledCloseInfo,
|
||||
disableNotification,
|
||||
|
@@ -212,8 +212,8 @@ internal object PollSerializer : KSerializer<Poll> {
|
||||
value.isAnonymous,
|
||||
regularPollType,
|
||||
correctOptionId = value.correctOptionId,
|
||||
explanation = value.caption,
|
||||
explanationEntities = value.captionEntities.asRawMessageEntities(),
|
||||
explanation = value.explanation,
|
||||
explanationEntities = value.explanationEntities.asRawMessageEntities(),
|
||||
openPeriod = (closeInfo as? ApproximateScheduledCloseInfo) ?.openDuration ?.seconds ?.toLong(),
|
||||
closeDate = (closeInfo as? ExactScheduledCloseInfo) ?.closeDateTime ?.unixMillisLong ?.div(1000L)
|
||||
)
|
||||
|
@@ -3,6 +3,7 @@ package com.github.insanusmokrassar.TelegramBotAPI.utils
|
||||
import kotlinx.serialization.SerializationStrategy
|
||||
import kotlinx.serialization.json.*
|
||||
|
||||
@Suppress("EXPERIMENTAL_API_USAGE")
|
||||
internal val nonstrictJsonFormat = Json {
|
||||
isLenient = true
|
||||
ignoreUnknownKeys = true
|
||||
|
@@ -4,9 +4,3 @@ import kotlinx.serialization.json.Json
|
||||
import kotlinx.serialization.json.JsonConfiguration
|
||||
|
||||
val TestsJsonFormat = Json(JsonConfiguration.Stable)
|
||||
val NonstrictTestsJsonFormat = Json {
|
||||
isLenient = true
|
||||
ignoreUnknownKeys = true
|
||||
serializeSpecialFloatingPointValues = true
|
||||
useArrayPolymorphism = true
|
||||
}
|
||||
|
Reference in New Issue
Block a user