mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-25 19:48:43 +00:00
potential fix in native
This commit is contained in:
parent
2a5f9a629d
commit
ff8d67a780
@ -4,8 +4,7 @@ import dev.inmo.tgbotapi.requests.abstracts.*
|
|||||||
import dev.inmo.tgbotapi.utils.TelegramAPIUrlsKeeper
|
import dev.inmo.tgbotapi.utils.TelegramAPIUrlsKeeper
|
||||||
import dev.inmo.tgbotapi.utils.mapWithCommonValues
|
import dev.inmo.tgbotapi.utils.mapWithCommonValues
|
||||||
import io.ktor.client.HttpClient
|
import io.ktor.client.HttpClient
|
||||||
import io.ktor.client.request.forms.MultiPartFormDataContent
|
import io.ktor.client.request.forms.*
|
||||||
import io.ktor.client.request.forms.formData
|
|
||||||
import io.ktor.http.Headers
|
import io.ktor.http.Headers
|
||||||
import io.ktor.http.HttpHeaders
|
import io.ktor.http.HttpHeaders
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ data class GetChat(
|
|||||||
override val resultDeserializer: DeserializationStrategy<ExtendedChat> = if (chatId is ChatIdWithThreadId) {
|
override val resultDeserializer: DeserializationStrategy<ExtendedChat> = if (chatId is ChatIdWithThreadId) {
|
||||||
ExtendedChatSerializer.BasedOnForumThread(chatId.threadId)
|
ExtendedChatSerializer.BasedOnForumThread(chatId.threadId)
|
||||||
} else {
|
} else {
|
||||||
ExtendedChatSerializer
|
ExtendedChatSerializer.Companion
|
||||||
}
|
}
|
||||||
override val requestSerializer: SerializationStrategy<*>
|
override val requestSerializer: SerializationStrategy<*>
|
||||||
get() = serializer()
|
get() = serializer()
|
||||||
|
@ -5,17 +5,17 @@ import dev.inmo.tgbotapi.types.message.abstracts.Message
|
|||||||
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializeOnlySerializer
|
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializeOnlySerializer
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable(ExtendedChatSerializer::class)
|
@Serializable(ExtendedChatSerializer.Companion::class)
|
||||||
sealed interface ExtendedChannelChat : ChannelChat, ExtendedPublicChat, ExtendedChatWithUsername {
|
sealed interface ExtendedChannelChat : ChannelChat, ExtendedPublicChat, ExtendedChatWithUsername {
|
||||||
val linkedGroupChatId: IdChatIdentifier?
|
val linkedGroupChatId: IdChatIdentifier?
|
||||||
}
|
}
|
||||||
|
|
||||||
@Serializable(ExtendedChatSerializer::class)
|
@Serializable(ExtendedChatSerializer.Companion::class)
|
||||||
sealed interface ExtendedGroupChat : GroupChat, ExtendedPublicChat {
|
sealed interface ExtendedGroupChat : GroupChat, ExtendedPublicChat {
|
||||||
val permissions: ChatPermissions
|
val permissions: ChatPermissions
|
||||||
}
|
}
|
||||||
|
|
||||||
@Serializable(ExtendedChatSerializer::class)
|
@Serializable(ExtendedChatSerializer.Companion::class)
|
||||||
sealed interface ExtendedPrivateChat : PrivateChat, ExtendedChatWithUsername {
|
sealed interface ExtendedPrivateChat : PrivateChat, ExtendedChatWithUsername {
|
||||||
val bio: String
|
val bio: String
|
||||||
val hasPrivateForwards: Boolean
|
val hasPrivateForwards: Boolean
|
||||||
@ -34,7 +34,7 @@ sealed interface ExtendedPublicChat : ExtendedChat, PublicChat {
|
|||||||
val membersHidden: Boolean
|
val membersHidden: Boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
@Serializable(ExtendedChatSerializer::class)
|
@Serializable(ExtendedChatSerializer.Companion::class)
|
||||||
sealed interface ExtendedSupergroupChat : SupergroupChat, ExtendedGroupChat, ExtendedChatWithUsername {
|
sealed interface ExtendedSupergroupChat : SupergroupChat, ExtendedGroupChat, ExtendedChatWithUsername {
|
||||||
val slowModeDelay: Long?
|
val slowModeDelay: Long?
|
||||||
val stickerSetName: StickerSetName?
|
val stickerSetName: StickerSetName?
|
||||||
@ -58,15 +58,15 @@ sealed interface ExtendedSupergroupChat : SupergroupChat, ExtendedGroupChat, Ext
|
|||||||
val isAggressiveAntiSpamEnabled: Boolean
|
val isAggressiveAntiSpamEnabled: Boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
@Serializable(ExtendedChatSerializer::class)
|
@Serializable(ExtendedChatSerializer.Companion::class)
|
||||||
sealed interface ExtendedForumChat : ExtendedSupergroupChat, ForumChat
|
sealed interface ExtendedForumChat : ExtendedSupergroupChat, ForumChat
|
||||||
|
|
||||||
@Serializable(ExtendedChatSerializer::class)
|
@Serializable(ExtendedChatSerializer.Companion::class)
|
||||||
sealed interface ExtendedChat : Chat {
|
sealed interface ExtendedChat : Chat {
|
||||||
val chatPhoto: ChatPhoto?
|
val chatPhoto: ChatPhoto?
|
||||||
}
|
}
|
||||||
|
|
||||||
@Serializable(ExtendedChatSerializer::class)
|
@Serializable(ExtendedChatSerializer.Companion::class)
|
||||||
sealed interface ExtendedChatWithUsername : UsernameChat, ExtendedChat {
|
sealed interface ExtendedChatWithUsername : UsernameChat, ExtendedChat {
|
||||||
val activeUsernames: List<Username>
|
val activeUsernames: List<Username>
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user