summaryrefslogtreecommitdiffstats
path: root/lib/private/Federation
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2018-06-04 12:16:03 +0200
committerBjoern Schiessle <bjoern@schiessle.org>2018-07-02 11:29:28 +0200
commitfab4e561f4f3ea9a3cf90a01c39c8d1e87ee9eab (patch)
tree723753d2819808ab0ed16d7c9574a3fd6a74ab26 /lib/private/Federation
parent41a1528888062610af58e319ce7bfa3ef8784da3 (diff)
downloadnextcloud-server-fab4e561f4f3ea9a3cf90a01c39c8d1e87ee9eab.tar.gz
nextcloud-server-fab4e561f4f3ea9a3cf90a01c39c8d1e87ee9eab.zip
send reshare over OCM API
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'lib/private/Federation')
-rw-r--r--lib/private/Federation/CloudFederationProviderManager.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/private/Federation/CloudFederationProviderManager.php b/lib/private/Federation/CloudFederationProviderManager.php
index 9aab1753a47..aa25ba9dee8 100644
--- a/lib/private/Federation/CloudFederationProviderManager.php
+++ b/lib/private/Federation/CloudFederationProviderManager.php
@@ -166,7 +166,7 @@ class CloudFederationProviderManager implements ICloudFederationProviderManager
/**
* @param string $url
* @param ICloudFederationNotification $notification
- * @return bool
+ * @return mixed
*/
public function sendNotification($url, ICloudFederationNotification $notification) {
$ocmEndPoint = $this->getOCMEndPoint($url);
@@ -182,8 +182,9 @@ class CloudFederationProviderManager implements ICloudFederationProviderManager
'timeout' => 10,
'connect_timeout' => 10,
]);
- if ($response->getStatusCode() === Http::STATUS_OK) {
- return true;
+ if ($response->getStatusCode() === Http::STATUS_CREATED) {
+ $result = json_decode($response->getBody(), true);
+ return (is_array($result)) ? $result : [];
}
} catch (\Exception $e) {
// log the error and return false