mirror of
https://github.com/InsanusMokrassar/TelegramBotApiLibraries.git
synced 2024-12-22 16:47:16 +00:00
small fixes
This commit is contained in:
parent
539515da43
commit
7845b7cc5f
@ -40,9 +40,9 @@ fun TelegramBot.createAdminsCacheAPI(
|
||||
"AdminsTable"
|
||||
).withMapper<ChatId, AdministratorChatMember, Identifier, String>(
|
||||
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<ChatId, AdminsCacheSettings, Identifier, String>(
|
||||
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
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user