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

potential fix in native

This commit is contained in:
InsanusMokrassar 2023-04-13 19:26:58 +06:00
parent 2a5f9a629d
commit ff8d67a780
3 changed files with 9 additions and 10 deletions

View File

@ -4,8 +4,7 @@ import dev.inmo.tgbotapi.requests.abstracts.*
import dev.inmo.tgbotapi.utils.TelegramAPIUrlsKeeper
import dev.inmo.tgbotapi.utils.mapWithCommonValues
import io.ktor.client.HttpClient
import io.ktor.client.request.forms.MultiPartFormDataContent
import io.ktor.client.request.forms.formData
import io.ktor.client.request.forms.*
import io.ktor.http.Headers
import io.ktor.http.HttpHeaders

View File

@ -19,7 +19,7 @@ data class GetChat(
override val resultDeserializer: DeserializationStrategy<ExtendedChat> = if (chatId is ChatIdWithThreadId) {
ExtendedChatSerializer.BasedOnForumThread(chatId.threadId)
} else {
ExtendedChatSerializer
ExtendedChatSerializer.Companion
}
override val requestSerializer: SerializationStrategy<*>
get() = serializer()

View File

@ -5,17 +5,17 @@ import dev.inmo.tgbotapi.types.message.abstracts.Message
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializeOnlySerializer
import kotlinx.serialization.Serializable
@Serializable(ExtendedChatSerializer::class)
@Serializable(ExtendedChatSerializer.Companion::class)
sealed interface ExtendedChannelChat : ChannelChat, ExtendedPublicChat, ExtendedChatWithUsername {
val linkedGroupChatId: IdChatIdentifier?
}
@Serializable(ExtendedChatSerializer::class)
@Serializable(ExtendedChatSerializer.Companion::class)
sealed interface ExtendedGroupChat : GroupChat, ExtendedPublicChat {
val permissions: ChatPermissions
}
@Serializable(ExtendedChatSerializer::class)
@Serializable(ExtendedChatSerializer.Companion::class)
sealed interface ExtendedPrivateChat : PrivateChat, ExtendedChatWithUsername {
val bio: String
val hasPrivateForwards: Boolean
@ -34,7 +34,7 @@ sealed interface ExtendedPublicChat : ExtendedChat, PublicChat {
val membersHidden: Boolean
}
@Serializable(ExtendedChatSerializer::class)
@Serializable(ExtendedChatSerializer.Companion::class)
sealed interface ExtendedSupergroupChat : SupergroupChat, ExtendedGroupChat, ExtendedChatWithUsername {
val slowModeDelay: Long?
val stickerSetName: StickerSetName?
@ -58,15 +58,15 @@ sealed interface ExtendedSupergroupChat : SupergroupChat, ExtendedGroupChat, Ext
val isAggressiveAntiSpamEnabled: Boolean
}
@Serializable(ExtendedChatSerializer::class)
@Serializable(ExtendedChatSerializer.Companion::class)
sealed interface ExtendedForumChat : ExtendedSupergroupChat, ForumChat
@Serializable(ExtendedChatSerializer::class)
@Serializable(ExtendedChatSerializer.Companion::class)
sealed interface ExtendedChat : Chat {
val chatPhoto: ChatPhoto?
}
@Serializable(ExtendedChatSerializer::class)
@Serializable(ExtendedChatSerializer.Companion::class)
sealed interface ExtendedChatWithUsername : UsernameChat, ExtendedChat {
val activeUsernames: List<Username>
}