1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2025-09-16 05:40:32 +00:00

filling of changelog and making Reaction.Paid to be an object

This commit is contained in:
2024-08-15 02:41:12 +06:00
parent 8823b268cc
commit c8d6b759b7
4 changed files with 23 additions and 14 deletions

View File

@@ -44,12 +44,9 @@ sealed interface Reaction {
}
@Serializable(Reaction.Companion::class)
class Paid : Reaction {
data object Paid : Reaction {
override val type: String
get() = Companion.type
companion object {
const val type: String = "paid"
}
get() = "paid"
}
@Serializable(Reaction.Companion::class)
@@ -82,7 +79,7 @@ sealed interface Reaction {
return when {
surrogate.emoji != null -> Emoji(surrogate.emoji)
surrogate.customEmojiId != null -> CustomEmoji(surrogate.customEmojiId)
surrogate.type == Paid.type -> Paid()
surrogate.type == Paid.type -> Paid
else -> Unknown(surrogate.type, json)
}
}