mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 00:03:48 +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.types.passport.encrypted.abstracts.EncryptedPassportElement
|
||||||
import dev.inmo.tgbotapi.utils.passport.Decryptor
|
import dev.inmo.tgbotapi.utils.passport.Decryptor
|
||||||
|
|
||||||
suspend fun TelegramBot.setPassportDataErrors(
|
public suspend fun TelegramBot.setPassportDataErrors(
|
||||||
userId: UserId,
|
userId: UserId,
|
||||||
errors: List<PassportElementError>
|
errors: List<PassportElementError>
|
||||||
) = execute(SetPassportDataErrors(userId, errors))
|
): Boolean = execute(SetPassportDataErrors(userId, errors))
|
||||||
suspend fun TelegramBot.setPassportDataErrors(
|
public suspend fun TelegramBot.setPassportDataErrors(
|
||||||
user: User,
|
user: User,
|
||||||
errors: List<PassportElementError>
|
errors: List<PassportElementError>
|
||||||
) = setPassportDataErrors(user.id, errors)
|
): Boolean = setPassportDataErrors(user.id, errors)
|
||||||
|
|
||||||
suspend fun TelegramBot.setPassportDataErrors(
|
public suspend fun TelegramBot.setPassportDataErrors(
|
||||||
userId: UserId,
|
userId: UserId,
|
||||||
passportData: PassportData,
|
passportData: PassportData,
|
||||||
decryptor: Decryptor,
|
decryptor: Decryptor,
|
||||||
@ -32,15 +32,15 @@ suspend fun TelegramBot.setPassportDataErrors(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
suspend fun TelegramBot.setPassportDataErrors(
|
public suspend fun TelegramBot.setPassportDataErrors(
|
||||||
user: User,
|
user: User,
|
||||||
passportData: PassportData,
|
passportData: PassportData,
|
||||||
decryptor: Decryptor,
|
decryptor: Decryptor,
|
||||||
mapper: suspend Decryptor.(EncryptedPassportElement) -> PassportElementError
|
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,
|
passportMessage: PassportMessage,
|
||||||
decryptor: Decryptor,
|
decryptor: Decryptor,
|
||||||
mapper: suspend Decryptor.(EncryptedPassportElement) -> PassportElementError
|
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