From e1c700878a2129f46cbf637c07dc96996c02ec21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Mon, 12 Nov 2018 12:55:11 +0100 Subject: [PATCH] Fix issue with comments longer than 64 chars MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/Notification/NotificationHelper.php | 2 +- lib/Notification/Notifier.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Notification/NotificationHelper.php b/lib/Notification/NotificationHelper.php index 2526624d8..5de17fe1f 100644 --- a/lib/Notification/NotificationHelper.php +++ b/lib/Notification/NotificationHelper.php @@ -146,7 +146,7 @@ public function sendMention(IComment $comment) { ->setDateTime(new DateTime()) ->setObject('card', (string) $card->getId()) ->setSubject('card-comment-mentioned', [$card->getTitle(), $boardId, $this->currentUser]) - ->setMessage($comment->getMessage()); + ->setMessage('{message}', ['message' => $comment->getMessage()]); $this->notificationManager->notify($notification); } } diff --git a/lib/Notification/Notifier.php b/lib/Notification/Notifier.php index e9fad5a3e..2b47e375a 100644 --- a/lib/Notification/Notifier.php +++ b/lib/Notification/Notifier.php @@ -127,7 +127,9 @@ public function prepare(INotification $notification, $languageCode) { ] ] ); - $notification->setParsedMessage($notification->getMessage()); + if ($notification->getMessage() === '{message}') { + $notification->setParsedMessage($notification->getMessageParameters()['message']); + } $notification->setLink($this->url->linkToRouteAbsolute('deck.page.index') . '#!/board/' . $boardId . '//card/' . $cardId . ''); break; case 'board-shared':