diff --git a/cache/admins/micro_utils/src/jvmMain/kotlin/dev/inmo/tgbotapi/libraries/cache/admins/AdminsCacheAPI.kt b/cache/admins/micro_utils/src/jvmMain/kotlin/dev/inmo/tgbotapi/libraries/cache/admins/AdminsCacheAPI.kt index dbde1f2..f46a31b 100644 --- a/cache/admins/micro_utils/src/jvmMain/kotlin/dev/inmo/tgbotapi/libraries/cache/admins/AdminsCacheAPI.kt +++ b/cache/admins/micro_utils/src/jvmMain/kotlin/dev/inmo/tgbotapi/libraries/cache/admins/AdminsCacheAPI.kt @@ -40,9 +40,9 @@ fun TelegramBot.createAdminsCacheAPI( "AdminsTable" ).withMapper( keyFromToTo = { chatId }, - valueFromToTo = { telegramAdminsSerializationFormat.encodeToString(this) }, + valueFromToTo = { telegramAdminsSerializationFormat.encodeToString(AdministratorChatMember.serializer(), this) }, keyToToFrom = { toChatId() }, - valueToToFrom = { telegramAdminsSerializationFormat.decodeFromString(this) } + valueToToFrom = { telegramAdminsSerializationFormat.decodeFromString(AdministratorChatMember.serializer(), this) } ), ExposedKeyValueRepo( database, @@ -65,9 +65,9 @@ fun TelegramBot.createAdminsCacheAPI( "DynamicAdminsCacheSettingsAPI" ).withMapper( keyFromToTo = { chatId }, - valueFromToTo = { telegramAdminsSerializationFormat.encodeToString(this) }, + valueFromToTo = { telegramAdminsSerializationFormat.encodeToString(AdminsCacheSettings.serializer() , this) }, keyToToFrom = { toChatId() }, - valueToToFrom = { telegramAdminsSerializationFormat.decodeFromString(this) } + valueToToFrom = { telegramAdminsSerializationFormat.decodeFromString(AdminsCacheSettings.serializer() , this) } ), scope )