1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-09-19 00:56:09 +00:00

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

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

View File

@ -2,9 +2,23 @@
## 17.0.0 ## 17.0.0
**THIS UPDATE CONTAINS SUPPORT OF BOTS API 7.9**
* Add support of subscriptions links handling
* Add support of info about sender chat. **It is important, that for channels will be actual `senderChat` instead of
`from` field due to `User` type of the last one**. You also may use extensions `Message.sender_chat` or `Any.withSenderChatMessageOrNull`
to access sender chat
* Add `Reaction.Paid`
Additional changes:
* `Core`:
* Add top level interfaces `OptionallyWithUser` and `OptionallyFromUser`. Old `WithUser` and `FromUser` interfaces
extending them with following overrides of `user` and `from` fields
* `API`: * `API`:
* Change order of delay and sending action in [SendActionDSL](tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendActionDSL.kt) * Change order of delay and sending action in [SendActionDSL](tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendActionDSL.kt)
(thanks to [DRSchlaubi](https://github.com/DRSchlaubi), [PR #833](https://github.com/InsanusMokrassar/ktgbotapi/pull/883)) (thanks to [DRSchlaubi](https://github.com/DRSchlaubi), [PR #833](https://github.com/InsanusMokrassar/ktgbotapi/pull/883)).
Besides, there has been changed way to create parallel sending of action and it must not lead to memory leaks anymore
## 16.0.0 ## 16.0.0

View File

@ -1,4 +1,4 @@
# TelegramBotAPI [![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi) [![Supported version](https://img.shields.io/badge/Telegram%20Bot%20API-7.8-blue)](https://core.telegram.org/bots/api-changelog#july-31-2024) # TelegramBotAPI [![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi) [![Supported version](https://img.shields.io/badge/Telegram%20Bot%20API-7.9-blue)](https://core.telegram.org/bots/api-changelog#august-14-2024)
| Docs | [![KDocs](https://img.shields.io/static/v1?label=Dokka&message=KDocs&color=blue&logo=kotlin)](https://tgbotapi.inmo.dev/index.html) [![Mini tutorial](https://img.shields.io/static/v1?label=Mk&message=Docs&color=blue&logo=mkdocs)](https://docs.inmo.dev/tgbotapi/index.html) | | Docs | [![KDocs](https://img.shields.io/static/v1?label=Dokka&message=KDocs&color=blue&logo=kotlin)](https://tgbotapi.inmo.dev/index.html) [![Mini tutorial](https://img.shields.io/static/v1?label=Mk&message=Docs&color=blue&logo=mkdocs)](https://docs.inmo.dev/tgbotapi/index.html) |
|:----------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| |:----------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|

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 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 INSTANCE Ldev/inmo/tgbotapi/types/reactions/Reaction$Paid;
public static final field type Ljava/lang/String; public fun equals (Ljava/lang/Object;)Z
public fun <init> ()V
public fun getType ()Ljava/lang/String; public fun getType ()Ljava/lang/String;
} public fun hashCode ()I
public final class dev/inmo/tgbotapi/types/reactions/Reaction$Paid$Companion {
public final fun serializer ()Lkotlinx/serialization/KSerializer; 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 { 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) @Serializable(Reaction.Companion::class)
class Paid : Reaction { data object Paid : Reaction {
override val type: String override val type: String
get() = Companion.type get() = "paid"
companion object {
const val type: String = "paid"
}
} }
@Serializable(Reaction.Companion::class) @Serializable(Reaction.Companion::class)
@ -82,7 +79,7 @@ sealed interface Reaction {
return when { return when {
surrogate.emoji != null -> Emoji(surrogate.emoji) surrogate.emoji != null -> Emoji(surrogate.emoji)
surrogate.customEmojiId != null -> CustomEmoji(surrogate.customEmojiId) surrogate.customEmojiId != null -> CustomEmoji(surrogate.customEmojiId)
surrogate.type == Paid.type -> Paid() surrogate.type == Paid.type -> Paid
else -> Unknown(surrogate.type, json) else -> Unknown(surrogate.type, json)
} }
} }