mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 04:55:48 +03:00
improve logs when checking terms of service status
should help diagnosing a client stuck with ToS block while thinking they had been accepted Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
parent
3b0f9a5beb
commit
ba4b28cc00
1 changed files with 5 additions and 1 deletions
|
@ -378,25 +378,29 @@ void TermsOfServiceChecker::start()
|
|||
|
||||
void TermsOfServiceChecker::slotServerTermsOfServiceRecieved(const QJsonDocument &reply)
|
||||
{
|
||||
qCDebug(lcConnectionValidator) << "Terms of service status" << reply;
|
||||
qCInfo(lcConnectionValidator) << "Terms of service status" << reply;
|
||||
|
||||
if (reply.object().contains("ocs")) {
|
||||
const auto needToSign = !reply.object().value("ocs").toObject().value("data").toObject().value("hasSigned").toBool(false);
|
||||
if (needToSign != _needToSign) {
|
||||
qCInfo(lcConnectionValidator) << "_needToSign" << (_needToSign ? "need to sign" : "no need to sign");
|
||||
_needToSign = needToSign;
|
||||
emit needToSignChanged();
|
||||
}
|
||||
} else if (_needToSign) {
|
||||
_needToSign = false;
|
||||
qCInfo(lcConnectionValidator) << "_needToSign" << (_needToSign ? "need to sign" : "no need to sign");
|
||||
emit needToSignChanged();
|
||||
}
|
||||
|
||||
qCInfo(lcConnectionValidator) << "done";
|
||||
emit done();
|
||||
}
|
||||
|
||||
void TermsOfServiceChecker::checkServerTermsOfService()
|
||||
{
|
||||
if (!_account) {
|
||||
qCInfo(lcConnectionValidator) << "done";
|
||||
emit done();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue