From 82eec270faab5cb2b830d9b7e81eb3517897194a Mon Sep 17 00:00:00 2001 From: Marek Bachmann Date: Fri, 23 Dec 2022 00:56:26 +0100 Subject: [PATCH] Change email subject to "(...)like in conversation(...)" for likes instead of "(...)new comment(...)" --- src/Navigation/Notifications/Repository/Notify.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Navigation/Notifications/Repository/Notify.php b/src/Navigation/Notifications/Repository/Notify.php index 75aff6b87..a0a1d5b51 100644 --- a/src/Navigation/Notifications/Repository/Notify.php +++ b/src/Navigation/Notifications/Repository/Notify.php @@ -783,9 +783,15 @@ class Notify extends BaseRepository $subject = $l10n->t('%s %s shared a new post', $subjectPrefix, $contact['name']); } else { $params['type'] = Model\Notification\Type::COMMENT; - $subject = $l10n->t('%1$s Comment to conversation #%2$d by %3$s', $subjectPrefix, $item['parent'], $contact['name']); + if ($params['verb'] = Activity::LIKE) { + $subject = $l10n->t('%1$s Like in conversation #%2$d by %3$s', $subjectPrefix, $item['parent'], $contact['name']); + } else { + $subject = $l10n->t('%1$s Comment to conversation #%2$d by %3$s', $subjectPrefix, $item['parent'], $contact['name']); + } } + + $msg = $this->notification->getMessageFromNotification($Notification); if (empty($msg)) { $this->logger->info('No notification message, quitting', ['uid' => $Notification->uid, 'id' => $Notification->id, 'type' => $Notification->type]);