mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-02 00:17:41 +01:00
Fall back to next challenge when push challenge fails during registration.
Co-authored-by: Greyson Parrelli <greyson@signal.org>
This commit is contained in:
@@ -499,7 +499,14 @@ class RegistrationViewModel : ViewModel() {
|
||||
Log.d(TAG, "Requesting push challenge token…")
|
||||
val pushSubmissionResult = RegistrationRepository.requestAndVerifyPushToken(context, session.sessionId, e164, password)
|
||||
Log.d(TAG, "Push challenge token submitted.", true)
|
||||
handleSessionStateResult(context, pushSubmissionResult)
|
||||
val success = handleSessionStateResult(context, pushSubmissionResult)
|
||||
|
||||
if (!success) {
|
||||
Log.i(TAG, "Push challenge was not successful, removing from challenge list to allow fallback.")
|
||||
store.update {
|
||||
it.copy(challengesRequested = it.challengesRequested.minus(Challenge.PUSH), inProgress = false)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user