Skip to content

Commit 761813e

Browse files
Merge pull request #357 from nextcloud/bugfix/s-14844/fallback-to-plain-subject
Fallback to plaintext subject if no rich subject is set
2 parents a0f055c + 7f3f7d6 commit 761813e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lib/MailQueueHandler.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,10 @@ protected function sendEmailToUser($userName, $email, $lang, $timezone, $maxTime
410410
* @return string
411411
*/
412412
protected function getHTMLSubject(IEvent $event): string {
413+
if ($event->getRichSubject() === '') {
414+
return htmlspecialchars($event->getParsedSubject());
415+
}
416+
413417
$placeholders = $replacements = [];
414418
foreach ($event->getRichSubjectParameters() as $placeholder => $parameter) {
415419
$placeholders[] = '{' . $placeholder . '}';

0 commit comments

Comments
 (0)