diff --git a/src/libsync/capabilities.cpp b/src/libsync/capabilities.cpp index da713b46c..1f4131e00 100644 --- a/src/libsync/capabilities.cpp +++ b/src/libsync/capabilities.cpp @@ -143,24 +143,27 @@ bool Capabilities::clientSideEncryptionAvailable() const } const auto version = properties.value(QStringLiteral("api-version"), "1.0").toByteArray(); - qCInfo(lcServerCapabilities) << "E2EE API version:" << version; const auto splittedVersion = version.split('.'); bool ok = false; const auto major = !splittedVersion.isEmpty() ? splittedVersion.at(0).toInt(&ok) : 0; if (!ok) { - qCWarning(lcServerCapabilities) << "Didn't understand version scheme (major), E2EE disabled"; + qCWarning(lcServerCapabilities) << "Didn't understand version scheme (major), E2EE disabled" << version; return false; } ok = false; const auto minor = splittedVersion.size() > 1 ? splittedVersion.at(1).toInt(&ok) : 0; if (!ok) { - qCWarning(lcServerCapabilities) << "Didn't understand version scheme (minor), E2EE disabled"; + qCWarning(lcServerCapabilities) << "Didn't understand version scheme (minor), E2EE disabled" << version; return false; } - return major == 1 && minor >= 1; + const auto capabilityAvailable = (major == 1 && minor >= 1); + if (!capabilityAvailable) { + qCInfo(lcServerCapabilities) << "Incompatible E2EE API version:" << version; + } + return capabilityAvailable; } bool Capabilities::notificationsAvailable() const