Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
feat(email): Add link to settings
Signed-off-by: Git'Fellow <[email protected]>
  • Loading branch information
solracsf authored and backportbot[bot] committed Sep 1, 2025
commit 5d39b848224eef0448dd49c85a87c307a05abb91
5 changes: 5 additions & 0 deletions lib/DigestSender.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,11 @@ public function sendDigestForUser(IUser $user, int $now, string $timezone, strin
);
}

$template->addBodyText(
$l10n->t('You can disable daily digest emails in the <a href="%s">settings</a>.', $this->urlGenerator->linkToRouteAbsolute('settings.PersonalSettings.index', ['section' => 'notifications'])),
$l10n->t('You can disable daily digest emails in the settings: %s', $this->urlGenerator->linkToRouteAbsolute('settings.PersonalSettings.index', ['section' => 'notifications']))
);

$template->addFooter('', $language);

$message = $this->mailer->createMessage();
Expand Down
5 changes: 5 additions & 0 deletions lib/MailQueueHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,11 @@ function ($event) use ($timezone, $l) {
$template->addBodyListItem($l->n('and %n more ', 'and %n more ', $skippedCount));
}

$template->addBodyText(
$l->t('You can change the frequency of these emails or disable them in the <a href="%s">settings</a>.', $this->urlGenerator->linkToRouteAbsolute('settings.PersonalSettings.index', ['section' => 'notifications'])),
$l->t('You can change the frequency of these emails or disable them in the settings: %s', $this->urlGenerator->linkToRouteAbsolute('settings.PersonalSettings.index', ['section' => 'notifications']))
);

$template->addFooter('', $lang);

$message = $this->mailer->createMessage();
Expand Down
2 changes: 1 addition & 1 deletion tests/MailQueueHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ public function testSendEmailToUser(): void {
->method('addHeader');
$template->expects($this->once())
->method('addHeading');
$template->expects($this->once())
$template->expects($this->exactly(2))
->method('addBodyText');
$template->expects($this->once())
->method('addFooter');
Expand Down
Loading