Only accept notification API Capability if endpoint is OCS-enabled
authorDaniel Molkentin <danimo@owncloud.com>
Mon, 4 Jul 2016 16:30:13 +0000 (18:30 +0200)
committerDaniel Molkentin <danimo@owncloud.com>
Mon, 4 Jul 2016 16:33:02 +0000 (18:33 +0200)
Fixes #5033

src/libsync/capabilities.cpp

index 7e4ff525931cf07d2e2c0ebc9d8a01c125800584..ca72a70bb337f869f7b271157955b12c62c6e07e 100644 (file)
@@ -73,7 +73,8 @@ bool Capabilities::shareResharing() const
 
 bool Capabilities::notificationsAvailable() const
 {
-    return _capabilities.contains("notifications");
+    // We require the OCS style API in 9.x, can't deal with the REST one only found in 8.2
+    return _capabilities.contains("notifications") && _capabilities["notifications"].toMap().contains("ocs-endpoints");
 }
 
 bool Capabilities::isValid() const