Browse Source

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

tags/v9.0.0beta2
Joas Schilling 8 years ago
parent
commit
31c9e047a8
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      apps/files_sharing/api/server2server.php

+ 7
- 0
apps/files_sharing/api/server2server.php View File

@@ -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);

Loading…
Cancel
Save