diff --git a/apps/sharebymail/lib/ShareByMailProvider.php b/apps/sharebymail/lib/ShareByMailProvider.php index 5f7a78059b3f0..96e7b108b1fd4 100644 --- a/apps/sharebymail/lib/ShareByMailProvider.php +++ b/apps/sharebymail/lib/ShareByMailProvider.php @@ -332,7 +332,17 @@ 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), @@ -350,6 +360,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 d5257d79304e6..0daa81c17f053 100644 --- a/lib/private/Share20/DefaultShareProvider.php +++ b/lib/private/Share20/DefaultShareProvider.php @@ -1466,16 +1466,20 @@ 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