From 12a35da4b67c5962ea8ad67ba24a23cbf5836bb6 Mon Sep 17 00:00:00 2001 From: vasya Date: Tue, 29 Jun 2021 03:34:27 +0300 Subject: [PATCH] remove unnecessary FromUser usages --- .../kotlin/dev/inmo/tgbotapi/types/ChatMemberUpdated.kt | 5 ++--- .../kotlin/dev/inmo/tgbotapi/types/games/GameHighScore.kt | 7 +++---- .../tgbotapi/types/message/ChatEvents/LeftChatMember.kt | 4 ++-- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/ChatMemberUpdated.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/ChatMemberUpdated.kt index e4ce566f49..856e113ac0 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/ChatMemberUpdated.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/ChatMemberUpdated.kt @@ -1,6 +1,5 @@ package dev.inmo.tgbotapi.types -import dev.inmo.tgbotapi.CommonAbstracts.FromUser import dev.inmo.tgbotapi.types.ChatMember.abstracts.ChatMember import dev.inmo.tgbotapi.types.chat.abstracts.Chat import kotlinx.serialization.SerialName @@ -11,7 +10,7 @@ data class ChatMemberUpdated( @SerialName(chatField) val chat: Chat, @SerialName(fromField) - override val user: User, + val user: User, @SerialName(dateField) val date: TelegramDate, @SerialName(oldChatMemberField) @@ -20,4 +19,4 @@ data class ChatMemberUpdated( val newChatMemberState: ChatMember, @SerialName(inviteLinkField) val inviteLink: ChatInviteLink? = null -) : FromUser +) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/games/GameHighScore.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/games/GameHighScore.kt index c02ad3b67e..f4a71608d0 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/games/GameHighScore.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/games/GameHighScore.kt @@ -1,16 +1,15 @@ package dev.inmo.tgbotapi.types.games -import dev.inmo.tgbotapi.CommonAbstracts.FromUser import dev.inmo.tgbotapi.types.* import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -data class GameHighScore ( +data class GameHighScore( @SerialName(positionField) val position: Long, @SerialName(userField) - override val user: User, + val user: User, @SerialName(scoreField) val score: Long -) : FromUser \ No newline at end of file +) \ No newline at end of file diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChatEvents/LeftChatMember.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChatEvents/LeftChatMember.kt index 859a87cdd1..e9ba9470ae 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChatEvents/LeftChatMember.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChatEvents/LeftChatMember.kt @@ -5,5 +5,5 @@ import dev.inmo.tgbotapi.types.User import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.CommonEvent data class LeftChatMember( - override val user: User -): CommonEvent, FromUser + val user: User +) : CommonEvent