diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-10-25 17:16:54 +0200 |
---|---|---|
committer | Côme Chilliet (Rebase PR Action) <come-nc@users.noreply.github.com> | 2022-11-29 14:36:29 +0000 |
commit | d9151ff35c4280b8e5bbb92e33fe2b89c2bee458 (patch) | |
tree | c0b5864c0c667156b82763382b4541d1fa073d37 /apps/files_sharing/lib/Notification/Notifier.php | |
parent | db995d464d06ace8231c41633287ce689b7d33b1 (diff) | |
download | nextcloud-server-d9151ff35c4280b8e5bbb92e33fe2b89c2bee458.tar.gz nextcloud-server-d9151ff35c4280b8e5bbb92e33fe2b89c2bee458.zip |
Get rid of all useless calls to setParsedSubject now that setRichSubject is able to do it
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/files_sharing/lib/Notification/Notifier.php')
-rw-r--r-- | apps/files_sharing/lib/Notification/Notifier.php | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/apps/files_sharing/lib/Notification/Notifier.php b/apps/files_sharing/lib/Notification/Notifier.php index 58f2a60fcdd..455d0fd66fc 100644 --- a/apps/files_sharing/lib/Notification/Notifier.php +++ b/apps/files_sharing/lib/Notification/Notifier.php @@ -132,7 +132,6 @@ class Notifier implements INotifier { $notification ->setParsedSubject($l->t('Share will expire tomorrow')) - ->setParsedMessage($l->t('One or more of your shares will expire tomorrow')) ->setRichMessage( $l->t('Your share of {node} will expire tomorrow'), [ @@ -232,14 +231,7 @@ class Notifier implements INotifier { throw new \InvalidArgumentException('Invalid subject'); } - $placeholders = $replacements = []; - foreach ($subjectParameters as $placeholder => $parameter) { - $placeholders[] = '{' . $placeholder . '}'; - $replacements[] = $parameter['name']; - } - - $notification->setParsedSubject(str_replace($placeholders, $replacements, $subject)) - ->setRichSubject($subject, $subjectParameters) + $notification->setRichSubject($subject, $subjectParameters) ->setIcon($this->url->getAbsoluteURL($this->url->imagePath('core', 'actions/share.svg'))); $acceptAction = $notification->createAction(); |