diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2018-05-30 17:44:08 +0200 |
---|---|---|
committer | Bjoern Schiessle <bjoern@schiessle.org> | 2018-07-02 11:29:28 +0200 |
commit | 41a1528888062610af58e319ce7bfa3ef8784da3 (patch) | |
tree | 4e650690a6569ea1f0633a1b46974014a75dd12b /apps/files_sharing/lib | |
parent | b7b84305a3388af3b678c95d105f6553952b0959 (diff) | |
download | nextcloud-server-41a1528888062610af58e319ce7bfa3ef8784da3.tar.gz nextcloud-server-41a1528888062610af58e319ce7bfa3ef8784da3.zip |
implement decline share
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r-- | apps/files_sharing/lib/External/Manager.php | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/External/Manager.php b/apps/files_sharing/lib/External/Manager.php index 0bbbbea7675..02783560afe 100644 --- a/apps/files_sharing/lib/External/Manager.php +++ b/apps/files_sharing/lib/External/Manager.php @@ -326,7 +326,7 @@ class Manager { * @param string $token * @param $remoteId id of the share * @param string $feedback - * @return mixed + * @return bool */ protected function tryOCMEndPoint($remoteDomain, $token, $remoteId, $feedback) { switch ($feedback) { @@ -343,8 +343,23 @@ class Manager { ); return $this->cloudFederationProviderManager->sendNotification($remoteDomain, $notification); + case 'decline': + $notification = $this->cloudFederationFactory->getCloudFederationNotification(); + $notification->setMessage( + 'SHARE_DECLINED', + 'file', + $remoteId, + [ + 'sharedSecret' => $token, + 'message' => 'Recipient declined the share' + ] + + ); + return $this->cloudFederationProviderManager->sendNotification($remoteDomain, $notification); } + return false; + } |