Merge pull request #19087 from owncloud/disable-remote-share-notifications-for-now
Disable remote share notifications for now
This commit is contained in:
commit
0c37a28a60
3 changed files with 13 additions and 7 deletions
|
@ -83,6 +83,8 @@ class Server2Server {
|
||||||
Activity::FILES_SHARING_APP, Activity::SUBJECT_REMOTE_SHARE_RECEIVED, array($user, trim($name, '/')), '', array(),
|
Activity::FILES_SHARING_APP, Activity::SUBJECT_REMOTE_SHARE_RECEIVED, array($user, trim($name, '/')), '', array(),
|
||||||
'', '', $shareWith, Activity::TYPE_REMOTE_SHARE, Activity::PRIORITY_LOW);
|
'', '', $shareWith, Activity::TYPE_REMOTE_SHARE, Activity::PRIORITY_LOW);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FIXME
|
||||||
$urlGenerator = \OC::$server->getURLGenerator();
|
$urlGenerator = \OC::$server->getURLGenerator();
|
||||||
|
|
||||||
$notificationManager = \OC::$server->getNotificationManager();
|
$notificationManager = \OC::$server->getNotificationManager();
|
||||||
|
@ -93,17 +95,18 @@ class Server2Server {
|
||||||
->setObject('remote_share', $remoteId)
|
->setObject('remote_share', $remoteId)
|
||||||
->setSubject('remote_share', [$user, trim($name, '/')]);
|
->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 = $notification->createAction();
|
||||||
$declineAction->setLabel('decline')
|
$declineAction->setLabel('decline')
|
||||||
->setLink($urlGenerator->getAbsoluteURL('/ocs/v1.php/apps/files_sharing/api/v1/remote_shares/' . $remoteId), 'DELETE');
|
->setLink($urlGenerator->getAbsoluteURL('/ocs/v1.php/apps/files_sharing/api/v1/remote_shares/' . $remoteId), 'DELETE');
|
||||||
|
$notification->addAction($declineAction);
|
||||||
|
|
||||||
$notification->addAction($acceptAction)
|
$acceptAction = $notification->createAction();
|
||||||
->addAction($declineAction);
|
$acceptAction->setLabel('accept')
|
||||||
|
->setLink($urlGenerator->getAbsoluteURL('/ocs/v1.php/apps/files_sharing/api/v1/remote_shares/' . $remoteId), 'POST');
|
||||||
|
$notification->addAction($acceptAction);
|
||||||
|
|
||||||
$notificationManager->notify($notification);
|
$notificationManager->notify($notification);
|
||||||
|
*/
|
||||||
|
|
||||||
return new \OC_OCS_Result();
|
return new \OC_OCS_Result();
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
|
|
@ -113,9 +113,12 @@ if ($config->getAppValue('core', 'shareapi_enabled', 'yes') === 'yes') {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FIXME
|
||||||
$manager = \OC::$server->getNotificationManager();
|
$manager = \OC::$server->getNotificationManager();
|
||||||
$manager->registerNotifier(function() {
|
$manager->registerNotifier(function() {
|
||||||
return new \OCA\Files_Sharing\Notifier(
|
return new \OCA\Files_Sharing\Notifier(
|
||||||
\OC::$server->getL10NFactory()
|
\OC::$server->getL10NFactory()
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
|
4
apps/files_sharing/lib/external/manager.php
vendored
4
apps/files_sharing/lib/external/manager.php
vendored
|
@ -214,7 +214,7 @@ class Manager {
|
||||||
$acceptShare->execute(array(1, $mountPoint, $hash, $id, $this->uid));
|
$acceptShare->execute(array(1, $mountPoint, $hash, $id, $this->uid));
|
||||||
$this->sendFeedbackToRemote($share['remote'], $share['share_token'], $share['remote_id'], 'accept');
|
$this->sendFeedbackToRemote($share['remote'], $share['share_token'], $share['remote_id'], 'accept');
|
||||||
|
|
||||||
$this->scrapNotification($share['remote_id']);
|
//FIXME $this->scrapNotification($share['remote_id']);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ class Manager {
|
||||||
$removeShare->execute(array($id, $this->uid));
|
$removeShare->execute(array($id, $this->uid));
|
||||||
$this->sendFeedbackToRemote($share['remote'], $share['share_token'], $share['remote_id'], 'decline');
|
$this->sendFeedbackToRemote($share['remote'], $share['share_token'], $share['remote_id'], 'decline');
|
||||||
|
|
||||||
$this->scrapNotification($share['remote_id']);
|
//FIXME $this->scrapNotification($share['remote_id']);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue