Fall back to next challenge when push challenge fails during registration.

Co-authored-by: Greyson Parrelli <greyson@signal.org>
This commit is contained in:
Cody Henthorne
2026-03-27 13:30:06 -04:00
parent 562185f46d
commit dbb3c8def9

View File

@@ -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)
}
}
}
}