diff --git a/apps/sharebymail/lib/ShareByMailProvider.php b/apps/sharebymail/lib/ShareByMailProvider.php index d28f7c51327a9..512f72c57491e 100644 --- a/apps/sharebymail/lib/ShareByMailProvider.php +++ b/apps/sharebymail/lib/ShareByMailProvider.php @@ -334,7 +334,18 @@ protected function sendEmail(IShare $share, array $emails): void { $emailTemplate->setSubject($this->l->t('%1$s shared %2$s with you', [$initiatorDisplayName, $filename])); $emailTemplate->addHeader(); $emailTemplate->addHeading($this->l->t('%1$s shared %2$s with you', [$initiatorDisplayName, $filename]), false); + $text = $this->l->t('%1$s shared »%2$s« with you.', [$initiatorDisplayName, $filename]); + if ($note !== '') { + $emailTemplate->addBodyText(htmlspecialchars($note), $note); + } + + $emailTemplate->addBodyText( + htmlspecialchars($text . ' ' . $this->l->t('Click the button below to open it.')), + $text + ); + + /* if ($note !== '') { $emailTemplate->addBodyListItem( htmlspecialchars($note), @@ -352,6 +363,7 @@ protected function sendEmail(IShare $share, array $emails): void { $this->getAbsoluteImagePath('caldav/time.png'), ); } + */ $emailTemplate->addBodyButton( $this->l->t('Open %s', [$filename]), diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php index 5300e6e1baad2..b045cd8f167e3 100644 --- a/lib/private/Share20/DefaultShareProvider.php +++ b/lib/private/Share20/DefaultShareProvider.php @@ -1483,16 +1483,21 @@ protected function sendUserShareMail( 'initiator' => $initiatorDisplayName, 'expiration' => $expiration, 'shareWith' => $shareWith, + 'note' => $note, ]); $emailTemplate->setSubject($l->t('%1$s shared %2$s with you', [$initiatorDisplayName, $filename])); $emailTemplate->addHeader(); $emailTemplate->addHeading($l->t('%1$s shared %2$s with you', [$initiatorDisplayName, $filename]), false); + $text = ''; + if ($note !== '') { $emailTemplate->addBodyText(htmlspecialchars($note), $note); } + $emailTemplate->addBodyText(htmlspecialchars($text), $text); + $emailTemplate->addBodyButton( $l->t('Open %s', [$filename]), $link