mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-26 20:18:45 +00:00
fixes in poll answer
This commit is contained in:
parent
d59e204002
commit
c260597799
@ -56,12 +56,12 @@ sealed interface PollAnswer: FromUser {
|
|||||||
private data class PollAnswerSurrogate(
|
private data class PollAnswerSurrogate(
|
||||||
@SerialName(pollIdField)
|
@SerialName(pollIdField)
|
||||||
val pollId: PollIdentifier,
|
val pollId: PollIdentifier,
|
||||||
@SerialName(userField)
|
|
||||||
val user: User,
|
|
||||||
@SerialName(optionIdsField)
|
@SerialName(optionIdsField)
|
||||||
val chosen: List<Int>,
|
val chosen: List<Int>,
|
||||||
|
@SerialName(userField)
|
||||||
|
val user: User = Anonymous.defaultUser,
|
||||||
@SerialName(voterChatField)
|
@SerialName(voterChatField)
|
||||||
val voterChat: ChannelChat?
|
val voterChat: ChannelChat? = null
|
||||||
)
|
)
|
||||||
operator fun invoke(
|
operator fun invoke(
|
||||||
pollId: PollIdentifier,
|
pollId: PollIdentifier,
|
||||||
@ -86,8 +86,8 @@ sealed interface PollAnswer: FromUser {
|
|||||||
encoder,
|
encoder,
|
||||||
PollAnswerSurrogate(
|
PollAnswerSurrogate(
|
||||||
value.pollId,
|
value.pollId,
|
||||||
value.user,
|
|
||||||
value.chosen,
|
value.chosen,
|
||||||
|
value.user,
|
||||||
(value as? Anonymous) ?.voterChat
|
(value as? Anonymous) ?.voterChat
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user