diff options
author | Joas Schilling <coding@schilljs.com> | 2019-12-03 17:52:33 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2019-12-03 17:52:33 +0100 |
commit | b7210955074f6e5393456684c615dc089b6f4fca (patch) | |
tree | 8ada2efc429093553be579f67d34d592eac7739d /apps/files | |
parent | cd71ad0e50ecafdbad67c99d77bd77b32bdd5ca5 (diff) | |
download | nextcloud-server-b7210955074f6e5393456684c615dc089b6f4fca.tar.gz nextcloud-server-b7210955074f6e5393456684c615dc089b6f4fca.zip |
Fix mixed up message and subject on notifications for file transfer
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/lib/Notification/Notifier.php | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/apps/files/lib/Notification/Notifier.php b/apps/files/lib/Notification/Notifier.php index 92950b8e1b1..2de05cac2e1 100644 --- a/apps/files/lib/Notification/Notifier.php +++ b/apps/files/lib/Notification/Notifier.php @@ -119,7 +119,7 @@ class Notifier implements INotifier { $notification->addParsedAction($approveAction) ->addParsedAction($disapproveAction) ->setRichSubject( - $l->t('Incomming file transfer from {user}'), + $l->t('Incoming file transfer from {user}'), [ 'user' => [ 'type' => 'user', @@ -127,7 +127,7 @@ class Notifier implements INotifier { 'name' => $param['sourceUser'], ], ]) - ->setParsedSubject(str_replace('{user}', $param['sourceUser'], $l->t('Incomming file transfer from {user}'))) + ->setParsedSubject(str_replace('{user}', $param['sourceUser'], $l->t('Incoming file transfer from {user}'))) ->setRichMessage( $l->t('Do you want to accept {path}?'), [ @@ -147,7 +147,8 @@ class Notifier implements INotifier { $param = $notification->getSubjectParameters(); $notification->setRichSubject($l->t('File transfer failed')) - ->setParsedSubject(str_replace(['{path}', '{user}'], [$param['nodeName'], $param['targetUser']], $l->t('Your transfer of {path} to {user} failed.'))) + ->setParsedSubject($l->t('File transfer failed')) + ->setRichMessage( $l->t('Your transfer of {path} to {user} failed.'), [ @@ -162,7 +163,7 @@ class Notifier implements INotifier { 'name' => $param['targetUser'], ], ]) - ->setParsedMessage($l->t('File transfer failed')); + ->setParsedMessage(str_replace(['{path}', '{user}'], [$param['nodeName'], $param['targetUser']], $l->t('Your transfer of {path} to {user} failed.'))); return $notification; } @@ -171,7 +172,8 @@ class Notifier implements INotifier { $param = $notification->getSubjectParameters(); $notification->setRichSubject($l->t('File transfer failed')) - ->setParsedSubject(str_replace(['{path}', '{user}'], [$param['nodeName'], $param['sourceUser']], $l->t('The transfer of {path} from {user} failed.'))) + ->setParsedSubject($l->t('File transfer failed')) + ->setRichMessage( $l->t('The transfer of {path} from {user} failed.'), [ @@ -186,7 +188,7 @@ class Notifier implements INotifier { 'name' => $param['sourceUser'], ], ]) - ->setParsedMessage($l->t('File transfer failed')); + ->setParsedMessage(str_replace(['{path}', '{user}'], [$param['nodeName'], $param['sourceUser']], $l->t('The transfer of {path} from {user} failed.'))); return $notification; } @@ -196,7 +198,8 @@ class Notifier implements INotifier { $param = $notification->getSubjectParameters(); $notification->setRichSubject($l->t('File transfer done')) - ->setParsedSubject(str_replace(['{path}', '{user}'], [$param['nodeName'], $param['targetUser']], $l->t('Your transfer of {path} to {user} has completed.'))) + ->setParsedSubject($l->t('File transfer done')) + ->setRichMessage( $l->t('Your transfer of {path} to {user} has completed.'), [ @@ -211,7 +214,7 @@ class Notifier implements INotifier { 'name' => $param['targetUser'], ], ]) - ->setParsedMessage($l->t('File transfer done')); + ->setParsedMessage(str_replace(['{path}', '{user}'], [$param['nodeName'], $param['targetUser']], $l->t('Your transfer of {path} to {user} has completed.'))); return $notification; } @@ -221,7 +224,8 @@ class Notifier implements INotifier { $param = $notification->getSubjectParameters(); $notification->setRichSubject($l->t('File transfer done')) - ->setParsedSubject(str_replace(['{path}', '{user}'], [$param['nodeName'], $param['sourceUser']], $l->t('The transfer of {path} from {user} has completed.'))) + ->setParsedSubject($l->t('File transfer done')) + ->setRichMessage( $l->t('The transfer of {path} from {user} has completed.'), [ @@ -236,7 +240,7 @@ class Notifier implements INotifier { 'name' => $param['sourceUser'], ], ]) - ->setParsedMessage($l->t('File transfer done')); + ->setParsedMessage(str_replace(['{path}', '{user}'], [$param['nodeName'], $param['sourceUser']], $l->t('The transfer of {path} from {user} has completed.'))); return $notification; } |