Add the item name to the federated sahre activity
This commit is contained in:
parent
95faaad5cf
commit
aa7c8ad191
|
@ -71,7 +71,7 @@ class Server2Server {
|
|||
$user = $owner . '@' . $this->cleanupRemote($remote);
|
||||
|
||||
\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);
|
||||
|
||||
return new \OC_OCS_Result();
|
||||
|
|
|
@ -150,6 +150,10 @@ class Activity implements IExtension {
|
|||
if ($app === self::FILES_SHARING_APP) {
|
||||
switch ($text) {
|
||||
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);
|
||||
case self::SUBJECT_REMOTE_SHARE_ACCEPTED:
|
||||
return (string) $l->t('%1$s accepted remote share %2$s', $params);
|
||||
|
@ -193,6 +197,7 @@ class Activity implements IExtension {
|
|||
case self::SUBJECT_REMOTE_SHARE_UNSHARED:
|
||||
return array(
|
||||
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_DECLINED:
|
||||
|
|
Loading…
Reference in New Issue