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];
}
$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',

View File

@@ -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())