Skip to content

Commit

Permalink
Merge pull request #49847 from nextcloud/removeNoisyTextEmails
Browse files Browse the repository at this point in the history
fix(shares): Remove noisy text from email
  • Loading branch information
solracsf authored Dec 23, 2024
2 parents bf86781 + 20215fb commit 4b3b09f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 32 deletions.
4 changes: 0 additions & 4 deletions apps/sharebymail/lib/ShareByMailProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,6 @@ protected function sendEmail(IShare $share, array $emails): void {
);
}

$emailTemplate->addBodyText(
$this->l->t('Click the button below to open it.')
);

$emailTemplate->addBodyButton(
$this->l->t('Open %s', [$filename]),
$link
Expand Down
24 changes: 0 additions & 24 deletions apps/sharebymail/tests/ShareByMailProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1289,10 +1289,6 @@ public function testSendMailNotificationWithSameUserAndUserEmail(): void {
->expects($this->once())
->method('addHeading')
->with('Mrs. Owner User shared file.txt with you');
$template
->expects($this->once())
->method('addBodyText')
->with('Click the button below to open it.');
$template
->expects($this->once())
->method('addBodyButton')
Expand Down Expand Up @@ -1399,10 +1395,6 @@ public function testSendMailNotificationWithSameUserAndUserEmailAndNote(): void
->expects($this->once())
->method('addHeading')
->with('Mrs. Owner User shared file.txt with you');
$template
->expects($this->once())
->method('addBodyText')
->with('Click the button below to open it.');

$this->urlGenerator->expects($this->once())->method('imagePath')
->with('core', 'caldav/description.png')
Expand Down Expand Up @@ -1525,10 +1517,6 @@ public function testSendMailNotificationWithSameUserAndUserEmailAndExpiration():
->expects($this->once())
->method('addHeading')
->with('Mrs. Owner User shared file.txt with you');
$template
->expects($this->once())
->method('addBodyText')
->with('Click the button below to open it.');

$expiration = new DateTime('2001-01-01');
$this->l->expects($this->once())
Expand Down Expand Up @@ -1657,10 +1645,6 @@ public function testSendMailNotificationWithDifferentUserAndNoUserEmail(): void
->expects($this->once())
->method('addHeading')
->with('Mr. Initiator User shared file.txt with you');
$template
->expects($this->once())
->method('addBodyText')
->with('Click the button below to open it.');
$template
->expects($this->once())
->method('addBodyButton')
Expand Down Expand Up @@ -1758,10 +1742,6 @@ public function testSendMailNotificationWithSameUserAndUserEmailAndReplyToDesact
->expects($this->once())
->method('addHeading')
->with('Mrs. Owner User shared file.txt with you');
$template
->expects($this->once())
->method('addBodyText')
->with('Click the button below to open it.');
$template
->expects($this->once())
->method('addBodyButton')
Expand Down Expand Up @@ -1863,10 +1843,6 @@ public function testSendMailNotificationWithDifferentUserAndNoUserEmailAndReplyT
->expects($this->once())
->method('addHeading')
->with('Mr. Initiator User shared file.txt with you');
$template
->expects($this->once())
->method('addBodyText')
->with('Click the button below to open it.');
$template
->expects($this->once())
->method('addBodyButton')
Expand Down
4 changes: 0 additions & 4 deletions lib/private/Share20/DefaultShareProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -1520,10 +1520,6 @@ protected function sendUserShareMail(
$emailTemplate->addBodyText(htmlspecialchars($note), $note);
}

$emailTemplate->addBodyText(
$l->t('Click the button below to open it.')
);

$emailTemplate->addBodyButton(
$l->t('Open %s', [$filename]),
$link
Expand Down

0 comments on commit 4b3b09f

Please sign in to comment.