diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2016-02-11 10:12:14 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2016-02-11 10:41:55 +0100 |
commit | 31c9e047a80d849a68e050f69e5b4cffdfca9056 (patch) | |
tree | d9373503fdbca6ef3e4db9f460c8c5bb76011baf /apps | |
parent | 2263b8b6937313500e29f9b00c8e36f1121bb054 (diff) | |
download | nextcloud-server-31c9e047a80d849a68e050f69e5b4cffdfca9056.tar.gz nextcloud-server-31c9e047a80d849a68e050f69e5b4cffdfca9056.zip |
Delete the notification when the owner unshares the remote before the user did anything
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/api/server2server.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/files_sharing/api/server2server.php b/apps/files_sharing/api/server2server.php index a27b3a3bd85..f04ddc81b84 100644 --- a/apps/files_sharing/api/server2server.php +++ b/apps/files_sharing/api/server2server.php @@ -225,6 +225,13 @@ class Server2Server { $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( Activity::FILES_SHARING_APP, Activity::SUBJECT_REMOTE_SHARE_UNSHARED, array($owner, $path), '', array(), '', '', $user, Activity::TYPE_REMOTE_SHARE, Activity::PRIORITY_MEDIUM); |