aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-12-04 09:09:34 +0100
committerGitHub <noreply@github.com>2019-12-04 09:09:34 +0100
commit99ed3b2d52ccedd0a553bf1b7c60bf4c3082c4bf (patch)
tree6d1e09f94411a3877f2f02cdc795927d025d60d0 /apps/files
parent867dea9cb35294e15524a046fae177e7a3c1ad82 (diff)
parentb7210955074f6e5393456684c615dc089b6f4fca (diff)
downloadnextcloud-server-99ed3b2d52ccedd0a553bf1b7c60bf4c3082c4bf.tar.gz
nextcloud-server-99ed3b2d52ccedd0a553bf1b7c60bf4c3082c4bf.zip
Merge pull request #18212 from nextcloud/bugfix/noid/subject-message-mixed-up
Fix mixed up message and subject on notifications for file transfer
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/lib/Notification/Notifier.php24
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;
}