Skip to content

Commit 707b642

Browse files
committed
Merge #288 [FIX NC30] Fixed share by mail notification text
2 parents 7782fe2 + eb760ab commit 707b642

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

apps/sharebymail/lib/ShareByMailProvider.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,17 @@ protected function sendEmail(IShare $share, array $emails): void {
332332
$emailTemplate->setSubject($this->l->t('%1$s shared %2$s with you', [$initiatorDisplayName, $filename]));
333333
$emailTemplate->addHeader();
334334
$emailTemplate->addHeading($this->l->t('%1$s shared %2$s with you', [$initiatorDisplayName, $filename]), false);
335+
$text = $this->l->t('%1$s shared »%2$s« with you.', [$initiatorDisplayName, $filename]);
335336

337+
if ($note !== '') {
338+
$emailTemplate->addBodyText(htmlspecialchars($note), $note);
339+
}
340+
$emailTemplate->addBodyText(
341+
htmlspecialchars($text . ' ' . $this->l->t('Click the button below to open it.')),
342+
$text
343+
);
344+
345+
/*
336346
if ($note !== '') {
337347
$emailTemplate->addBodyListItem(
338348
htmlspecialchars($note),
@@ -350,6 +360,7 @@ protected function sendEmail(IShare $share, array $emails): void {
350360
$this->getAbsoluteImagePath('caldav/time.png'),
351361
);
352362
}
363+
*/
353364

354365
$emailTemplate->addBodyButton(
355366
$this->l->t('Open %s', [$filename]),

lib/private/Share20/DefaultShareProvider.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1478,16 +1478,20 @@ protected function sendUserShareMail(
14781478
'initiator' => $initiatorDisplayName,
14791479
'expiration' => $expiration,
14801480
'shareWith' => $shareWith,
1481+
'note' => $note
14811482
]);
14821483

14831484
$emailTemplate->setSubject($l->t('%1$s shared %2$s with you', [$initiatorDisplayName, $filename]));
14841485
$emailTemplate->addHeader();
14851486
$emailTemplate->addHeading($l->t('%1$s shared %2$s with you', [$initiatorDisplayName, $filename]), false);
1486-
1487+
$text = '';
1488+
14871489
if ($note !== '') {
14881490
$emailTemplate->addBodyText(htmlspecialchars($note), $note);
14891491
}
14901492

1493+
$emailTemplate->addBodyText(htmlspecialchars($text), $text);
1494+
14911495
$emailTemplate->addBodyButton(
14921496
$l->t('Open %s', [$filename]),
14931497
$link

0 commit comments

Comments
 (0)