mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 08:13:47 +00:00
add EncodeDefault for SendLocation realizations default fields which should be encoded anyway
This commit is contained in:
parent
8a6e06bbf0
commit
cdecce96e7
@ -113,7 +113,7 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
|
|||||||
override fun method(): String = "sendLocation"
|
override fun method(): String = "sendLocation"
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class Live internal constructor(
|
data class Live (
|
||||||
@SerialName(chatIdField)
|
@SerialName(chatIdField)
|
||||||
override val chatId: ChatIdentifier,
|
override val chatId: ChatIdentifier,
|
||||||
@SerialName(latitudeField)
|
@SerialName(latitudeField)
|
||||||
@ -121,6 +121,7 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
|
|||||||
@SerialName(longitudeField)
|
@SerialName(longitudeField)
|
||||||
override val longitude: Double,
|
override val longitude: Double,
|
||||||
@SerialName(livePeriodField)
|
@SerialName(livePeriodField)
|
||||||
|
@EncodeDefault
|
||||||
override val livePeriod: Seconds = LiveLocation.INDEFINITE_LIVE_PERIOD,
|
override val livePeriod: Seconds = LiveLocation.INDEFINITE_LIVE_PERIOD,
|
||||||
@SerialName(horizontalAccuracyField)
|
@SerialName(horizontalAccuracyField)
|
||||||
override val horizontalAccuracy: Meters? = null,
|
override val horizontalAccuracy: Meters? = null,
|
||||||
@ -129,8 +130,10 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
|
|||||||
@SerialName(proximityAlertRadiusField)
|
@SerialName(proximityAlertRadiusField)
|
||||||
override val proximityAlertRadius: Meters? = null,
|
override val proximityAlertRadius: Meters? = null,
|
||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
|
@EncodeDefault
|
||||||
override val threadId: MessageThreadId? = chatId.threadId,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
@SerialName(businessConnectionIdField)
|
@SerialName(businessConnectionIdField)
|
||||||
|
@EncodeDefault
|
||||||
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@ -159,7 +162,7 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class Static internal constructor(
|
data class Static (
|
||||||
@SerialName(chatIdField)
|
@SerialName(chatIdField)
|
||||||
override val chatId: ChatIdentifier,
|
override val chatId: ChatIdentifier,
|
||||||
@SerialName(latitudeField)
|
@SerialName(latitudeField)
|
||||||
@ -167,8 +170,10 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
|
|||||||
@SerialName(longitudeField)
|
@SerialName(longitudeField)
|
||||||
override val longitude: Double,
|
override val longitude: Double,
|
||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
|
@EncodeDefault
|
||||||
override val threadId: MessageThreadId? = chatId.threadId,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
@SerialName(businessConnectionIdField)
|
@SerialName(businessConnectionIdField)
|
||||||
|
@EncodeDefault
|
||||||
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
override val businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
|
Loading…
Reference in New Issue
Block a user