1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2025-09-14 21:00:15 +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

@@ -25224,14 +25224,12 @@ public final class dev/inmo/tgbotapi/types/reactions/Reaction$Emoji$Companion {
}
public final class dev/inmo/tgbotapi/types/reactions/Reaction$Paid : dev/inmo/tgbotapi/types/reactions/Reaction {
public static final field Companion Ldev/inmo/tgbotapi/types/reactions/Reaction$Paid$Companion;
public static final field type Ljava/lang/String;
public fun <init> ()V
public static final field INSTANCE Ldev/inmo/tgbotapi/types/reactions/Reaction$Paid;
public fun equals (Ljava/lang/Object;)Z
public fun getType ()Ljava/lang/String;
}
public final class dev/inmo/tgbotapi/types/reactions/Reaction$Paid$Companion {
public fun hashCode ()I
public final fun serializer ()Lkotlinx/serialization/KSerializer;
public fun toString ()Ljava/lang/String;
}
public final class dev/inmo/tgbotapi/types/reactions/Reaction$Unknown : dev/inmo/tgbotapi/types/reactions/Reaction {

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)
}
}