Delete the notification when the owner unshares the remote before the user did anything

This commit is contained in:
Joas Schilling 2016-02-11 10:12:14 +01:00
parent 2263b8b693
commit 31c9e047a8

View file

@ -225,6 +225,13 @@ class Server2Server {
$path = trim($share['name'], '/'); $path = trim($share['name'], '/');
} }
$notificationManager = \OC::$server->getNotificationManager();
$notification = $notificationManager->createNotification();
$notification->setApp('files_sharing')
->setUser($share['user'])
->setObject('remote_share', (int) $share['id']);
$notificationManager->markProcessed($notification);
\OC::$server->getActivityManager()->publishActivity( \OC::$server->getActivityManager()->publishActivity(
Activity::FILES_SHARING_APP, Activity::SUBJECT_REMOTE_SHARE_UNSHARED, array($owner, $path), '', array(), Activity::FILES_SHARING_APP, Activity::SUBJECT_REMOTE_SHARE_UNSHARED, array($owner, $path), '', array(),
'', '', $user, Activity::TYPE_REMOTE_SHARE, Activity::PRIORITY_MEDIUM); '', '', $user, Activity::TYPE_REMOTE_SHARE, Activity::PRIORITY_MEDIUM);