effectively revert 17fae47bdb
fixing i10n
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
f13d5a3ec0
commit
c6becac993
|
@ -255,7 +255,7 @@ class CloudFederationProviderFiles implements ICloudFederationProvider {
|
|||
->setAffectedUser($shareWith)
|
||||
->setObject('remote_share', (int)$shareId, $name);
|
||||
\OC::$server->getActivityManager()->publish($event);
|
||||
$this->notifyAboutNewShare($shareWith, $shareId, $ownerFederatedId, $sharedByFederatedId, $name, $sharedBy, $owner);
|
||||
$this->notifyAboutNewShare($shareWith, $shareId, $ownerFederatedId, $sharedByFederatedId, $name);
|
||||
} else {
|
||||
$groupMembers = $this->groupManager->get($shareWith)->getUsers();
|
||||
foreach ($groupMembers as $user) {
|
||||
|
@ -266,7 +266,7 @@ class CloudFederationProviderFiles implements ICloudFederationProvider {
|
|||
->setAffectedUser($user->getUID())
|
||||
->setObject('remote_share', (int)$shareId, $name);
|
||||
\OC::$server->getActivityManager()->publish($event);
|
||||
$this->notifyAboutNewShare($user->getUID(), $shareId, $ownerFederatedId, $sharedByFederatedId, $name, $sharedBy, $owner);
|
||||
$this->notifyAboutNewShare($user->getUID(), $shareId, $ownerFederatedId, $sharedByFederatedId, $name);
|
||||
}
|
||||
}
|
||||
return $shareId;
|
||||
|
@ -332,22 +332,13 @@ class CloudFederationProviderFiles implements ICloudFederationProvider {
|
|||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* notify user about new federated share
|
||||
*
|
||||
* @param $shareWith
|
||||
* @param $shareId
|
||||
* @param $ownerFederatedId
|
||||
* @param $sharedByFederatedId
|
||||
* @param $name
|
||||
*/
|
||||
private function notifyAboutNewShare($shareWith, $shareId, $ownerFederatedId, $sharedByFederatedId, $name, $sharedBy, $owner) {
|
||||
private function notifyAboutNewShare($shareWith, $shareId, $ownerFederatedId, $sharedByFederatedId, $name): void {
|
||||
$notification = $this->notificationManager->createNotification();
|
||||
$notification->setApp('files_sharing')
|
||||
->setUser($shareWith)
|
||||
->setDateTime(new \DateTime())
|
||||
->setObject('remote_share', $shareId)
|
||||
->setSubject('remote_share', [$ownerFederatedId, $sharedByFederatedId, trim($name, '/'), $sharedBy, $owner]);
|
||||
->setSubject('remote_share', [$ownerFederatedId, $sharedByFederatedId, trim($name, '/')]);
|
||||
|
||||
$declineAction = $notification->createAction();
|
||||
$declineAction->setLabel('decline')
|
||||
|
|
Loading…
Reference in New Issue