1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-12-22 16:47:13 +00:00

ChatMemberUpdated now inherits WithChat and fill changes related to WithChat

This commit is contained in:
InsanusMokrassar 2023-03-16 19:32:43 +06:00
parent 0eba0c4e15
commit b688fa570a
2 changed files with 9 additions and 3 deletions

View File

@ -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

View File

@ -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