summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-09-18 11:58:20 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-09-18 11:58:20 +0200
commit0c37a28a6046f1051ea2a0d8665cfc35bd84ea39 (patch)
tree2d49f5eac3ec11125ffac53f6609eccb61e05bf4 /apps
parent0eb37e2d64f347dfbb869aafbd4efdcd2d72497e (diff)
parent6bc93c740194d245bb9a7d1f230ed33461f842a7 (diff)
downloadnextcloud-server-0c37a28a6046f1051ea2a0d8665cfc35bd84ea39.tar.gz
nextcloud-server-0c37a28a6046f1051ea2a0d8665cfc35bd84ea39.zip
Merge pull request #19087 from owncloud/disable-remote-share-notifications-for-now
Disable remote share notifications for now
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/api/server2server.php13
-rw-r--r--apps/files_sharing/appinfo/app.php3
-rw-r--r--apps/files_sharing/lib/external/manager.php4
3 files changed, 13 insertions, 7 deletions
diff --git a/apps/files_sharing/api/server2server.php b/apps/files_sharing/api/server2server.php
index 6ecaea20535..7d8860ad6ff 100644
--- a/apps/files_sharing/api/server2server.php
+++ b/apps/files_sharing/api/server2server.php
@@ -83,6 +83,8 @@ class Server2Server {
Activity::FILES_SHARING_APP, Activity::SUBJECT_REMOTE_SHARE_RECEIVED, array($user, trim($name, '/')), '', array(),
'', '', $shareWith, Activity::TYPE_REMOTE_SHARE, Activity::PRIORITY_LOW);
+ /**
+ * FIXME
$urlGenerator = \OC::$server->getURLGenerator();
$notificationManager = \OC::$server->getNotificationManager();
@@ -93,17 +95,18 @@ class Server2Server {
->setObject('remote_share', $remoteId)
->setSubject('remote_share', [$user, trim($name, '/')]);
- $acceptAction = $notification->createAction();
- $acceptAction->setLabel('accept')
- ->setLink($urlGenerator->getAbsoluteURL('/ocs/v1.php/apps/files_sharing/api/v1/remote_shares/' . $remoteId), 'POST');
$declineAction = $notification->createAction();
$declineAction->setLabel('decline')
->setLink($urlGenerator->getAbsoluteURL('/ocs/v1.php/apps/files_sharing/api/v1/remote_shares/' . $remoteId), 'DELETE');
+ $notification->addAction($declineAction);
- $notification->addAction($acceptAction)
- ->addAction($declineAction);
+ $acceptAction = $notification->createAction();
+ $acceptAction->setLabel('accept')
+ ->setLink($urlGenerator->getAbsoluteURL('/ocs/v1.php/apps/files_sharing/api/v1/remote_shares/' . $remoteId), 'POST');
+ $notification->addAction($acceptAction);
$notificationManager->notify($notification);
+ */
return new \OC_OCS_Result();
} catch (\Exception $e) {
diff --git a/apps/files_sharing/appinfo/app.php b/apps/files_sharing/appinfo/app.php
index 8d919d1466f..15c0b864b08 100644
--- a/apps/files_sharing/appinfo/app.php
+++ b/apps/files_sharing/appinfo/app.php
@@ -113,9 +113,12 @@ if ($config->getAppValue('core', 'shareapi_enabled', 'yes') === 'yes') {
}
}
+/**
+ * FIXME
$manager = \OC::$server->getNotificationManager();
$manager->registerNotifier(function() {
return new \OCA\Files_Sharing\Notifier(
\OC::$server->getL10NFactory()
);
});
+ */
diff --git a/apps/files_sharing/lib/external/manager.php b/apps/files_sharing/lib/external/manager.php
index 17142e95099..8552b2fbd34 100644
--- a/apps/files_sharing/lib/external/manager.php
+++ b/apps/files_sharing/lib/external/manager.php
@@ -214,7 +214,7 @@ class Manager {
$acceptShare->execute(array(1, $mountPoint, $hash, $id, $this->uid));
$this->sendFeedbackToRemote($share['remote'], $share['share_token'], $share['remote_id'], 'accept');
- $this->scrapNotification($share['remote_id']);
+ //FIXME $this->scrapNotification($share['remote_id']);
return true;
}
@@ -237,7 +237,7 @@ class Manager {
$removeShare->execute(array($id, $this->uid));
$this->sendFeedbackToRemote($share['remote'], $share['share_token'], $share['remote_id'], 'decline');
- $this->scrapNotification($share['remote_id']);
+ //FIXME $this->scrapNotification($share['remote_id']);
return true;
}