From d1d73fef3048942467149ae8e3ddf0224e2e92a7 Mon Sep 17 00:00:00 2001 From: Nicholas Date: Fri, 3 Mar 2023 09:51:27 -0500 Subject: [PATCH] Support multiple sequential captcha challenges. --- .../RegistrationSessionProcessor.kt | 5 +++ .../fragments/EnterPhoneNumberFragment.java | 3 ++ .../viewmodel/BaseRegistrationViewModel.java | 9 +++++- .../exceptions/TokenNotAcceptedException.kt | 6 ++++ .../internal/push/PushServiceSocket.java | 32 ++++++++++++++++++- 5 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 libsignal/service/src/main/java/org/whispersystems/signalservice/api/push/exceptions/TokenNotAcceptedException.kt diff --git a/app/src/main/java/org/thoughtcrime/securesms/registration/RegistrationSessionProcessor.kt b/app/src/main/java/org/thoughtcrime/securesms/registration/RegistrationSessionProcessor.kt index 066d62555..17c9684fb 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/registration/RegistrationSessionProcessor.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/registration/RegistrationSessionProcessor.kt @@ -8,6 +8,7 @@ import org.whispersystems.signalservice.api.push.exceptions.MustRequestNewCodeEx import org.whispersystems.signalservice.api.push.exceptions.NoSuchSessionException import org.whispersystems.signalservice.api.push.exceptions.NonNormalizedPhoneNumberException import org.whispersystems.signalservice.api.push.exceptions.RateLimitException +import org.whispersystems.signalservice.api.push.exceptions.TokenNotAcceptedException import org.whispersystems.signalservice.api.util.Preconditions import org.whispersystems.signalservice.internal.ServiceResponse import org.whispersystems.signalservice.internal.ServiceResponseProcessor @@ -41,6 +42,10 @@ sealed class RegistrationSessionProcessor(response: ServiceResponse