mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-05 16:19:26 +00:00
RawChat boilerplate was removed and replaced by serializers
This commit is contained in:
@@ -3,7 +3,8 @@ package com.github.insanusmokrassar.TelegramBotAPI.requests.chat.get
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ChatRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.RawChat
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.ExtendedChatSerializer
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.extended.ExtendedChat
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.types.chatIdField
|
||||
import kotlinx.serialization.*
|
||||
|
||||
@@ -11,7 +12,7 @@ import kotlinx.serialization.*
|
||||
data class GetChat(
|
||||
@SerialName(chatIdField)
|
||||
override val chatId: ChatIdentifier
|
||||
): ChatRequest, SimpleRequest<RawChat> {
|
||||
): ChatRequest, SimpleRequest<ExtendedChat> {
|
||||
override fun method(): String = "getChat"
|
||||
override fun resultSerializer(): KSerializer<RawChat> = RawChat.serializer()
|
||||
override fun resultSerializer(): KSerializer<ExtendedChat> = ExtendedChatSerializer
|
||||
}
|
||||
|
Reference in New Issue
Block a user