mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-08 09:23:47 +00:00
moving to an explicit API mode
refactored `passport` package
This commit is contained in:
parent
b8837bffdc
commit
ed39fde776
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user