From fab4e561f4f3ea9a3cf90a01c39c8d1e87ee9eab Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Mon, 4 Jun 2018 12:16:03 +0200 Subject: send reshare over OCM API Signed-off-by: Bjoern Schiessle --- lib/private/Federation/CloudFederationProviderManager.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/private/Federation') 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 -- cgit v1.2.3