aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2018-05-30 17:44:08 +0200
committerBjoern Schiessle <bjoern@schiessle.org>2018-07-02 11:29:28 +0200
commit41a1528888062610af58e319ce7bfa3ef8784da3 (patch)
tree4e650690a6569ea1f0633a1b46974014a75dd12b /apps/files_sharing/lib
parentb7b84305a3388af3b678c95d105f6553952b0959 (diff)
downloadnextcloud-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.php17
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;
+
}