1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-12-22 16:47:13 +00:00

moving to an explicit API mode

refactored `passport` package
This commit is contained in:
bpavuk 2024-07-12 22:10:31 +03:00
parent b8837bffdc
commit ed39fde776
No known key found for this signature in database
GPG Key ID: B501D26D9DEA9CFE

View File

@ -10,16 +10,16 @@ import dev.inmo.tgbotapi.types.passport.PassportElementError
import dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElement
import dev.inmo.tgbotapi.utils.passport.Decryptor
suspend fun TelegramBot.setPassportDataErrors(
public suspend fun TelegramBot.setPassportDataErrors(
userId: UserId,
errors: List<PassportElementError>
) = execute(SetPassportDataErrors(userId, errors))
suspend fun TelegramBot.setPassportDataErrors(
): Boolean = execute(SetPassportDataErrors(userId, errors))
public suspend fun TelegramBot.setPassportDataErrors(
user: User,
errors: List<PassportElementError>
) = setPassportDataErrors(user.id, errors)
): Boolean = setPassportDataErrors(user.id, errors)
suspend fun TelegramBot.setPassportDataErrors(
public suspend fun TelegramBot.setPassportDataErrors(
userId: UserId,
passportData: PassportData,
decryptor: Decryptor,
@ -32,15 +32,15 @@ suspend fun TelegramBot.setPassportDataErrors(
}
}
)
suspend fun TelegramBot.setPassportDataErrors(
public suspend fun TelegramBot.setPassportDataErrors(
user: User,
passportData: PassportData,
decryptor: Decryptor,
mapper: suspend Decryptor.(EncryptedPassportElement) -> PassportElementError
) = setPassportDataErrors(user.id, passportData, decryptor, mapper)
): Boolean = setPassportDataErrors(user.id, passportData, decryptor, mapper)
suspend fun TelegramBot.setPassportDataErrors(
public suspend fun TelegramBot.setPassportDataErrors(
passportMessage: PassportMessage,
decryptor: Decryptor,
mapper: suspend Decryptor.(EncryptedPassportElement) -> PassportElementError
) = setPassportDataErrors(passportMessage.user, passportMessage.passportData, decryptor, mapper)
): Boolean = setPassportDataErrors(passportMessage.user, passportMessage.passportData, decryptor, mapper)