Skip to content
Snippets Groups Projects
Commit aa7c8ad1 authored by Joas Schilling's avatar Joas Schilling
Browse files

Add the item name to the federated sahre activity

parent 95faaad5
Branches
No related tags found
No related merge requests found
...@@ -71,7 +71,7 @@ class Server2Server { ...@@ -71,7 +71,7 @@ class Server2Server {
$user = $owner . '@' . $this->cleanupRemote($remote); $user = $owner . '@' . $this->cleanupRemote($remote);
\OC::$server->getActivityManager()->publishActivity( \OC::$server->getActivityManager()->publishActivity(
Activity::FILES_SHARING_APP, Activity::SUBJECT_REMOTE_SHARE_RECEIVED, array($user), '', 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);
return new \OC_OCS_Result(); return new \OC_OCS_Result();
......
...@@ -150,6 +150,10 @@ class Activity implements IExtension { ...@@ -150,6 +150,10 @@ class Activity implements IExtension {
if ($app === self::FILES_SHARING_APP) { if ($app === self::FILES_SHARING_APP) {
switch ($text) { switch ($text) {
case self::SUBJECT_REMOTE_SHARE_RECEIVED: case self::SUBJECT_REMOTE_SHARE_RECEIVED:
if (sizeof($params) === 2) {
// New activity ownCloud 8.2+
return (string) $l->t('You received a new remote share %2$s from %1$s', $params);
}
return (string) $l->t('You received a new remote share from %s', $params); return (string) $l->t('You received a new remote share from %s', $params);
case self::SUBJECT_REMOTE_SHARE_ACCEPTED: case self::SUBJECT_REMOTE_SHARE_ACCEPTED:
return (string) $l->t('%1$s accepted remote share %2$s', $params); return (string) $l->t('%1$s accepted remote share %2$s', $params);
...@@ -193,6 +197,7 @@ class Activity implements IExtension { ...@@ -193,6 +197,7 @@ class Activity implements IExtension {
case self::SUBJECT_REMOTE_SHARE_UNSHARED: case self::SUBJECT_REMOTE_SHARE_UNSHARED:
return array( return array(
0 => '',// We can not use 'username' since the user is in a different ownCloud 0 => '',// We can not use 'username' since the user is in a different ownCloud
//1 => 'file', in theory its a file, but it does not exist yet/anymore
); );
case self::SUBJECT_REMOTE_SHARE_ACCEPTED: case self::SUBJECT_REMOTE_SHARE_ACCEPTED:
case self::SUBJECT_REMOTE_SHARE_DECLINED: case self::SUBJECT_REMOTE_SHARE_DECLINED:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment