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"
|
"AdminsTable"
|
||||||
).withMapper<ChatId, AdministratorChatMember, Identifier, String>(
|
).withMapper<ChatId, AdministratorChatMember, Identifier, String>(
|
||||||
keyFromToTo = { chatId },
|
keyFromToTo = { chatId },
|
||||||
valueFromToTo = { telegramAdminsSerializationFormat.encodeToString(this) },
|
valueFromToTo = { telegramAdminsSerializationFormat.encodeToString(AdministratorChatMember.serializer(), this) },
|
||||||
keyToToFrom = { toChatId() },
|
keyToToFrom = { toChatId() },
|
||||||
valueToToFrom = { telegramAdminsSerializationFormat.decodeFromString(this) }
|
valueToToFrom = { telegramAdminsSerializationFormat.decodeFromString(AdministratorChatMember.serializer(), this) }
|
||||||
),
|
),
|
||||||
ExposedKeyValueRepo(
|
ExposedKeyValueRepo(
|
||||||
database,
|
database,
|
||||||
@ -65,9 +65,9 @@ fun TelegramBot.createAdminsCacheAPI(
|
|||||||
"DynamicAdminsCacheSettingsAPI"
|
"DynamicAdminsCacheSettingsAPI"
|
||||||
).withMapper<ChatId, AdminsCacheSettings, Identifier, String>(
|
).withMapper<ChatId, AdminsCacheSettings, Identifier, String>(
|
||||||
keyFromToTo = { chatId },
|
keyFromToTo = { chatId },
|
||||||
valueFromToTo = { telegramAdminsSerializationFormat.encodeToString(this) },
|
valueFromToTo = { telegramAdminsSerializationFormat.encodeToString(AdminsCacheSettings.serializer() , this) },
|
||||||
keyToToFrom = { toChatId() },
|
keyToToFrom = { toChatId() },
|
||||||
valueToToFrom = { telegramAdminsSerializationFormat.decodeFromString(this) }
|
valueToToFrom = { telegramAdminsSerializationFormat.decodeFromString(AdminsCacheSettings.serializer() , this) }
|
||||||
),
|
),
|
||||||
scope
|
scope
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user