mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 08:13:47 +00:00
ChatMemberUpdated now inherits WithChat and fill changes related to WithChat
This commit is contained in:
parent
0eba0c4e15
commit
b688fa570a
@ -2,6 +2,10 @@
|
||||
|
||||
## 7.0.1
|
||||
|
||||
* `Core`:
|
||||
* New interface `WithChat` which contains `chat` field
|
||||
* `Message` now inherits `WithChat`
|
||||
* `ChatMemberUpdated` now inherits `WithChat`
|
||||
* `Utils`:
|
||||
* Improvements in `same`-notations
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
package dev.inmo.tgbotapi.types.chat.member
|
||||
|
||||
import dev.inmo.tgbotapi.abstracts.WithChat
|
||||
import dev.inmo.tgbotapi.abstracts.WithUser
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.chat.User
|
||||
@ -9,9 +11,9 @@ import kotlinx.serialization.Serializable
|
||||
@Serializable
|
||||
data class ChatMemberUpdated(
|
||||
@SerialName(chatField)
|
||||
val chat: Chat,
|
||||
override val chat: Chat,
|
||||
@SerialName(fromField)
|
||||
val user: User,
|
||||
override val user: User,
|
||||
@SerialName(dateField)
|
||||
val date: TelegramDate,
|
||||
@SerialName(oldChatMemberField)
|
||||
@ -20,4 +22,4 @@ data class ChatMemberUpdated(
|
||||
val newChatMemberState: ChatMember,
|
||||
@SerialName(inviteLinkField)
|
||||
val inviteLink: ChatInviteLink? = null
|
||||
)
|
||||
) : WithChat, WithUser
|
||||
|
Loading…
Reference in New Issue
Block a user