]> dgit.raspbian.org Git - nextcloud-desktop.git/commitdiff
improve logs when checking terms of service status
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Wed, 23 Oct 2024 13:18:10 +0000 (15:18 +0200)
committerMatthieu Gallien <matthieu.gallien@nextcloud.com>
Wed, 23 Oct 2024 16:20:08 +0000 (18:20 +0200)
should help diagnosing a client stuck with ToS block while thinking they
had been accepted

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
src/gui/connectionvalidator.cpp

index c5ed581db05b9f0f66d3a40b516ede77f41b22cf..75cb21762fcb053b3cb23a6e98f1bfca2e43305f 100644 (file)
@@ -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();
     }