Merge pull request #653 from nextcloud/bugfix/649

Fix comment mention subject
This commit is contained in:
Julius Härtl
2018-10-17 11:39:34 +02:00
committed by GitHub
2 changed files with 4 additions and 4 deletions

View File

@@ -115,10 +115,10 @@ class Notifier implements INotifier {
$dn = $params[2]; $dn = $params[2];
} }
$notification->setParsedSubject( $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( $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' => [ 'user' => [
'type' => 'user', 'type' => 'user',

View File

@@ -149,13 +149,13 @@ class NotifierTest extends \Test\TestCase {
$this->cardMapper->expects($this->once()) $this->cardMapper->expects($this->once())
->method('findBoardId') ->method('findBoardId')
->willReturn(999); ->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()) $notification->expects($this->once())
->method('setParsedSubject') ->method('setParsedSubject')
->with($expectedMessage); ->with($expectedMessage);
$notification->expects($this->once()) $notification->expects($this->once())
->method('setRichSubject') ->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()) $this->url->expects($this->once())