mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-05-02 06:33:38 +01:00
Allow for captcha solving for reg v2.
This commit is contained in:
committed by
Alex Hart
parent
ba4cdea75d
commit
ca14ed9b2c
@@ -54,12 +54,21 @@ class RegistrationApi(
|
||||
/**
|
||||
* Submit a verification code sent by the service via one of the supported channels (SMS, phone call) to prove the registrant's control of the phone number.
|
||||
*/
|
||||
fun verifyAccount(verificationCode: String, sessionId: String): NetworkResult<RegistrationSessionMetadataResponse> {
|
||||
fun verifyAccount(sessionId: String, verificationCode: String): NetworkResult<RegistrationSessionMetadataResponse> {
|
||||
return NetworkResult.fromFetch {
|
||||
pushServiceSocket.submitVerificationCode(sessionId, verificationCode)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Submits the solved captcha token to the service.
|
||||
*/
|
||||
fun submitCaptchaToken(sessionId: String, captchaToken: String): NetworkResult<RegistrationSessionMetadataResponse> {
|
||||
return NetworkResult.fromFetch {
|
||||
pushServiceSocket.patchVerificationSession(sessionId, null, null, null, captchaToken, null)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Submit the cryptographic assets required for an account to use the service.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user