From 0a4a58cddc15c162106a14a36115083b11815541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Tue, 16 Oct 2018 10:16:30 +0200 Subject: [PATCH 1/2] Fix comment mention subject MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes #649 Signed-off-by: Julius Härtl --- lib/Notification/Notifier.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Notification/Notifier.php b/lib/Notification/Notifier.php index 52f75bd4c..e9fad5a3e 100644 --- a/lib/Notification/Notifier.php +++ b/lib/Notification/Notifier.php @@ -115,10 +115,10 @@ class Notifier implements INotifier { $dn = $params[2]; } $notification->setParsedSubject( - (string) $l->t('%s has mentioned in a comment on "%s".', [$dn, $params[0]]) + (string) $l->t('%s has mentioned you in a comment on "%s".', [$dn, $params[0]]) ); $notification->setRichSubject( - (string) $l->t('{user} has mentioned in a comment on "%s".', [$params[0]]), + (string) $l->t('{user} has mentioned you in a comment on "%s".', [$params[0]]), [ 'user' => [ 'type' => 'user', From 2a3b4a8e3bbde173ed5f0c6928831706b062076b Mon Sep 17 00:00:00 2001 From: rakekniven Date: Wed, 17 Oct 2018 10:57:29 +0200 Subject: [PATCH 2/2] Update NotifierTest.php Fixed tests --- tests/unit/Notification/NotifierTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/Notification/NotifierTest.php b/tests/unit/Notification/NotifierTest.php index c61399594..cb128acb5 100644 --- a/tests/unit/Notification/NotifierTest.php +++ b/tests/unit/Notification/NotifierTest.php @@ -149,13 +149,13 @@ class NotifierTest extends \Test\TestCase { $this->cardMapper->expects($this->once()) ->method('findBoardId') ->willReturn(999); - $expectedMessage = 'admin has mentioned in a comment on "Card title".'; + $expectedMessage = 'admin has mentioned you in a comment on "Card title".'; $notification->expects($this->once()) ->method('setParsedSubject') ->with($expectedMessage); $notification->expects($this->once()) ->method('setRichSubject') - ->with('{user} has mentioned in a comment on "Card title".'); + ->with('{user} has mentioned you in a comment on "Card title".'); $this->url->expects($this->once())