forked from github/szkolny
[API/Librus] Fix some more captcha errors.
This commit is contained in:
parent
907b75b22d
commit
e02d3e571d
@ -38,14 +38,18 @@ class LibrusLoginMessages(val data: DataLibrus, val onSuccess: () -> Unit) {
|
|||||||
|
|
||||||
text?.contains("grecaptcha.ready") == true -> {
|
text?.contains("grecaptcha.ready") == true -> {
|
||||||
val url = response?.request()?.url()?.toString() ?: run {
|
val url = response?.request()?.url()?.toString() ?: run {
|
||||||
data.error(TAG, ERROR_LIBRUS_MESSAGES_OTHER, response, text)
|
//data.error(TAG, ERROR_LIBRUS_MESSAGES_OTHER, response, text)
|
||||||
|
data.messagesLoginSuccessful = false
|
||||||
|
onSuccess()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
LibrusRecaptchaHelper(data.app, url, text, onSuccess = { newUrl ->
|
LibrusRecaptchaHelper(data.app, url, text, onSuccess = { newUrl ->
|
||||||
loginWithSynergia(newUrl)
|
loginWithSynergia(newUrl)
|
||||||
}, onTimeout = {
|
}, onTimeout = {
|
||||||
data.error(TAG, ERROR_LOGIN_LIBRUS_MESSAGES_TIMEOUT, response, text)
|
//data.error(TAG, ERROR_LOGIN_LIBRUS_MESSAGES_TIMEOUT, response, text)
|
||||||
|
data.messagesLoginSuccessful = false
|
||||||
|
onSuccess()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user