owncloudcmd: Read the server version from the capabilities
authorOlivier Goffart <ogoffart@woboq.com>
Mon, 29 Oct 2018 10:38:54 +0000 (11:38 +0100)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 15 Dec 2020 09:58:15 +0000 (10:58 +0100)
Issue: #6846

src/cmd/cmd.cpp

index 62f719a78ea188c54e887fe03d2c6b8f8121362a..9ea2546bc43c6fcbd0721fa0706145943700c59b 100644 (file)
@@ -463,6 +463,7 @@ int main(int argc, char **argv)
             auto caps = json.object().value("ocs").toObject().value("data").toObject().value("capabilities").toObject();
             qDebug() << "Server capabilities" << caps;
             account->setCapabilities(caps.toVariantMap());
+            account->setServerVersion(caps["core"].toObject()["status"].toObject()["version"].toString());
             loop.quit();
         });
         job->start();