mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-28 18:10:38 +00:00
Update dependencies
This commit is contained in:
parent
c25468a71e
commit
78cd0b13de
3 changed files with 7 additions and 12 deletions
|
@ -11,9 +11,9 @@ import org.asamk.signal.manager.helper.PinHelper;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.whispersystems.signalservice.api.kbs.MasterKey;
|
||||
import org.whispersystems.signalservice.api.push.exceptions.ChallengeRequiredException;
|
||||
import org.whispersystems.signalservice.api.push.exceptions.NoSuchSessionException;
|
||||
import org.whispersystems.signalservice.api.push.exceptions.NonSuccessfulResponseCodeException;
|
||||
import org.whispersystems.signalservice.api.push.exceptions.PushChallengeRequiredException;
|
||||
import org.whispersystems.signalservice.api.push.exceptions.TokenNotAcceptedException;
|
||||
import org.whispersystems.signalservice.api.registration.RegistrationApi;
|
||||
import org.whispersystems.signalservice.internal.push.LockedException;
|
||||
|
@ -39,8 +39,7 @@ public class NumberVerificationUtils {
|
|||
RegistrationSessionMetadataResponse sessionResponse;
|
||||
try {
|
||||
sessionResponse = getValidSession(registrationApi, sessionId);
|
||||
} catch (PushChallengeRequiredException |
|
||||
org.whispersystems.signalservice.api.push.exceptions.CaptchaRequiredException e) {
|
||||
} catch (ChallengeRequiredException e) {
|
||||
if (captcha != null) {
|
||||
sessionResponse = submitCaptcha(registrationApi, sessionId, captcha);
|
||||
} else {
|
||||
|
@ -99,7 +98,7 @@ public class NumberVerificationUtils {
|
|||
voiceVerification ? VerificationCodeTransport.VOICE : VerificationCodeTransport.SMS);
|
||||
try {
|
||||
Utils.handleResponseException(response);
|
||||
} catch (org.whispersystems.signalservice.api.push.exceptions.CaptchaRequiredException e) {
|
||||
} catch (ChallengeRequiredException e) {
|
||||
throw new CaptchaRequiredException(e.getMessage(), e);
|
||||
} catch (org.whispersystems.signalservice.api.push.exceptions.NonNormalizedPhoneNumberException e) {
|
||||
throw new NonNormalizedPhoneNumberException("Phone number is not normalized ("
|
||||
|
@ -179,9 +178,7 @@ public class NumberVerificationUtils {
|
|||
captcha = captcha == null ? null : captcha.replace("signalcaptcha://", "");
|
||||
try {
|
||||
return Utils.handleResponseException(registrationApi.submitCaptchaToken(sessionId, captcha));
|
||||
} catch (PushChallengeRequiredException |
|
||||
org.whispersystems.signalservice.api.push.exceptions.CaptchaRequiredException |
|
||||
TokenNotAcceptedException _e) {
|
||||
} catch (ChallengeRequiredException | TokenNotAcceptedException _e) {
|
||||
throw new CaptchaRequiredException("Captcha not accepted");
|
||||
} catch (NonSuccessfulResponseCodeException e) {
|
||||
if (e.code == 400) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue