diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/ChannelChat.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/ChannelChat.kt index 2a6043809f..3e42f887d1 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/ChannelChat.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/ChannelChat.kt @@ -1,3 +1,7 @@ package dev.inmo.tgbotapi.types.chat.abstracts +import dev.inmo.tgbotapi.types.chat.PreviewChatSerializer +import kotlinx.serialization.Serializable + +@Serializable(PreviewChatSerializer::class) interface ChannelChat : SuperPublicChat diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/GroupChat.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/GroupChat.kt index 849d6b9e3a..591a565624 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/GroupChat.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/GroupChat.kt @@ -1,3 +1,7 @@ package dev.inmo.tgbotapi.types.chat.abstracts +import dev.inmo.tgbotapi.types.chat.PreviewChatSerializer +import kotlinx.serialization.Serializable + +@Serializable(PreviewChatSerializer::class) interface GroupChat : PublicChat diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/PrivateChat.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/PrivateChat.kt index 2459398282..65a254544b 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/PrivateChat.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/PrivateChat.kt @@ -1,5 +1,9 @@ package dev.inmo.tgbotapi.types.chat.abstracts +import dev.inmo.tgbotapi.types.chat.PreviewChatSerializer +import kotlinx.serialization.Serializable + +@Serializable(PreviewChatSerializer::class) interface PrivateChat : Chat, UsernameChat { val firstName: String val lastName: String diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/PublicChat.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/PublicChat.kt index 98c70cec84..f78e434f44 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/PublicChat.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/PublicChat.kt @@ -1,5 +1,9 @@ package dev.inmo.tgbotapi.types.chat.abstracts +import dev.inmo.tgbotapi.types.chat.PreviewChatSerializer +import kotlinx.serialization.Serializable + +@Serializable(PreviewChatSerializer::class) interface PublicChat : Chat { val title: String } diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/SuperPublicChat.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/SuperPublicChat.kt index 0403f89fa6..ce290dbe2f 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/SuperPublicChat.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/SuperPublicChat.kt @@ -1,3 +1,7 @@ package dev.inmo.tgbotapi.types.chat.abstracts +import dev.inmo.tgbotapi.types.chat.PreviewChatSerializer +import kotlinx.serialization.Serializable + +@Serializable(PreviewChatSerializer::class) interface SuperPublicChat : PublicChat, UsernameChat diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/SupergroupChat.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/SupergroupChat.kt index f49d4d144f..d4ad4d90d2 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/SupergroupChat.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/SupergroupChat.kt @@ -1,3 +1,7 @@ package dev.inmo.tgbotapi.types.chat.abstracts +import dev.inmo.tgbotapi.types.chat.PreviewChatSerializer +import kotlinx.serialization.Serializable + +@Serializable(PreviewChatSerializer::class) interface SupergroupChat : GroupChat, SuperPublicChat diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/UsernameChat.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/UsernameChat.kt index 99ced04a6a..eb2149799f 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/UsernameChat.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/UsernameChat.kt @@ -1,7 +1,10 @@ package dev.inmo.tgbotapi.types.chat.abstracts import dev.inmo.tgbotapi.types.Username +import dev.inmo.tgbotapi.types.chat.PreviewChatSerializer +import kotlinx.serialization.Serializable +@Serializable(PreviewChatSerializer::class) interface UsernameChat : Chat { val username: Username? } diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/extended/ExtendedChannelChat.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/extended/ExtendedChannelChat.kt index cbda4c68db..e21d2e314b 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/extended/ExtendedChannelChat.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/extended/ExtendedChannelChat.kt @@ -1,8 +1,11 @@ package dev.inmo.tgbotapi.types.chat.abstracts.extended import dev.inmo.tgbotapi.types.ChatId +import dev.inmo.tgbotapi.types.chat.ExtendedChatSerializer import dev.inmo.tgbotapi.types.chat.abstracts.ChannelChat +import kotlinx.serialization.Serializable +@Serializable(ExtendedChatSerializer::class) interface ExtendedChannelChat : ChannelChat, ExtendedPublicChat { val linkedGroupChatId: ChatId? } diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/extended/ExtendedGroupChat.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/extended/ExtendedGroupChat.kt index df9c9e157b..a24939a299 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/extended/ExtendedGroupChat.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/extended/ExtendedGroupChat.kt @@ -1,8 +1,11 @@ package dev.inmo.tgbotapi.types.chat.abstracts.extended import dev.inmo.tgbotapi.types.chat.ChatPermissions +import dev.inmo.tgbotapi.types.chat.ExtendedChatSerializer import dev.inmo.tgbotapi.types.chat.abstracts.GroupChat +import kotlinx.serialization.Serializable +@Serializable(ExtendedChatSerializer::class) interface ExtendedGroupChat : GroupChat, ExtendedPublicChat { val permissions: ChatPermissions } \ No newline at end of file diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/extended/ExtendedPrivateChat.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/extended/ExtendedPrivateChat.kt index 297c7f3986..55a03723a5 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/extended/ExtendedPrivateChat.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/extended/ExtendedPrivateChat.kt @@ -1,7 +1,10 @@ package dev.inmo.tgbotapi.types.chat.abstracts.extended +import dev.inmo.tgbotapi.types.chat.ExtendedChatSerializer import dev.inmo.tgbotapi.types.chat.abstracts.PrivateChat +import kotlinx.serialization.Serializable +@Serializable(ExtendedChatSerializer::class) interface ExtendedPrivateChat : PrivateChat, ExtendedChat { val bio: String } diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/extended/ExtendedSupergroupChat.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/extended/ExtendedSupergroupChat.kt index 75ef3df3f6..fc50b3bd37 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/extended/ExtendedSupergroupChat.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/abstracts/extended/ExtendedSupergroupChat.kt @@ -1,8 +1,11 @@ package dev.inmo.tgbotapi.types.chat.abstracts.extended import dev.inmo.tgbotapi.types.* +import dev.inmo.tgbotapi.types.chat.ExtendedChatSerializer import dev.inmo.tgbotapi.types.chat.abstracts.SupergroupChat +import kotlinx.serialization.Serializable +@Serializable(ExtendedChatSerializer::class) interface ExtendedSupergroupChat : SupergroupChat, ExtendedGroupChat { val slowModeDelay: Long? val stickerSetName: StickerSetName?