Use the item name when refering to the unaccepted remote share
This commit is contained in:
parent
bfcb8ffeb3
commit
7e3f8d3ac1
|
@ -170,8 +170,14 @@ class Server2Server {
|
|||
$query = \OCP\DB::prepare('DELETE FROM `*PREFIX*share_external` WHERE `remote_id` = ? AND `share_token` = ?');
|
||||
$query->execute(array($id, $token));
|
||||
|
||||
if ($share['accepted']) {
|
||||
$path = trim($mountpoint, '/');
|
||||
} else {
|
||||
$path = trim($share['name'], '/');
|
||||
}
|
||||
|
||||
\OC::$server->getActivityManager()->publishActivity(
|
||||
'files_sharing', \OCA\Files_Sharing\Activity::SUBJECT_REMOTE_SHARE_UNSHARED, array($owner, $mountpoint), '', array(),
|
||||
'files_sharing', \OCA\Files_Sharing\Activity::SUBJECT_REMOTE_SHARE_UNSHARED, array($owner, $path), '', array(),
|
||||
'', '', $user, \OCA\Files_Sharing\Activity::TYPE_REMOTE_SHARE, \OCA\Files_Sharing\Activity::PRIORITY_MEDIUM);
|
||||
}
|
||||
|
||||
|
|
|
@ -190,12 +190,12 @@ class Activity implements IExtension {
|
|||
if ($app === self::FILES_SHARING_APP) {
|
||||
switch ($text) {
|
||||
case self::SUBJECT_REMOTE_SHARE_RECEIVED:
|
||||
case self::SUBJECT_REMOTE_SHARE_UNSHARED:
|
||||
return array(
|
||||
0 => '',// We can not use 'username' since the user is in a different ownCloud
|
||||
);
|
||||
case self::SUBJECT_REMOTE_SHARE_ACCEPTED:
|
||||
case self::SUBJECT_REMOTE_SHARE_DECLINED:
|
||||
case self::SUBJECT_REMOTE_SHARE_UNSHARED:
|
||||
return array(
|
||||
0 => '',// We can not use 'username' since the user is in a different ownCloud
|
||||
1 => 'file',
|
||||
|
|
Loading…
Reference in New Issue