diff --git a/tgbotapi.core/build.gradle b/tgbotapi.core/build.gradle index cbfc29632b..be6596e3be 100644 --- a/tgbotapi.core/build.gradle +++ b/tgbotapi.core/build.gradle @@ -109,11 +109,11 @@ kapt { arguments { arg( "com.github.matfax.klassindex.IndexSubclasses", - "dev.inmo.tgbotapi.types.update.abstracts.Update", - "dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.ChatEvent", +// "dev.inmo.tgbotapi.types.update.abstracts.Update", +// "dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.ChatEvent", // "dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValue", // "dev.inmo.tgbotapi.types.message.content.abstracts.ResendableContent", -// "dev.inmo.tgbotapi.types.message.abstracts.Message", + "dev.inmo.tgbotapi.types.message.abstracts.Message", // "dev.inmo.tgbotapi.types.passport.encrypted_data.abstracts.EncryptedPassportElement", // "dev.inmo.tgbotapi.types.passport.PassportElementError", // "dev.inmo.tgbotapi.types.CallbackQuery.CallbackQuery", diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/MessageEntity/textsources/TextSourceSerializer.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/MessageEntity/textsources/TextSourceSerializer.kt index f3474b1363..a9f76a93ad 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/MessageEntity/textsources/TextSourceSerializer.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/MessageEntity/textsources/TextSourceSerializer.kt @@ -30,7 +30,6 @@ private val baseSerializers: Map> = mapOf( "cashtag" to CashTagTextSource.serializer(), ) -@Serializer(TextSource::class) object TextSourceSerializer : TypedSerializer(TextSource::class, baseSerializers) { override fun include(type: String, serializer: KSerializer) { require(type !in baseSerializers.keys) diff --git a/tgbotapi.core/src/jvmTest/kotlin/Temporal.kt b/tgbotapi.core/src/jvmTest/kotlin/Temporal.kt index bdd90212f7..031dd4456d 100644 --- a/tgbotapi.core/src/jvmTest/kotlin/Temporal.kt +++ b/tgbotapi.core/src/jvmTest/kotlin/Temporal.kt @@ -42,8 +42,7 @@ val result = mutableMapOf, Set>>() fun main() { - result[Update::class] = KlassIndex.getSubclasses(Update::class).toSet() - result[ChatEvent::class] = KlassIndex.getSubclasses(ChatEvent::class).toSet() + result[Message::class] = KlassIndex.getSubclasses(Message::class).toSet() println("import dev.inmo.tgbotapi.utils.PreviewFeature") val importsToFuns = result.keys.flatMap { println("import ${it.qualifiedName}")