From 51517d3a36d6571cc7905632f6db1d4a8f3c4863 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Tue, 16 Jul 2019 10:23:34 +0200 Subject: [PATCH] Add icon to twofactor_backupcodes notification Signed-off-by: Jan-Christoph Borchardt --- apps/twofactor_backupcodes/lib/Notifications/Notifier.php | 3 +++ .../tests/Unit/Notification/NotifierTest.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/twofactor_backupcodes/lib/Notifications/Notifier.php b/apps/twofactor_backupcodes/lib/Notifications/Notifier.php index 658f23a7a93..e4e2bcebb68 100644 --- a/apps/twofactor_backupcodes/lib/Notifications/Notifier.php +++ b/apps/twofactor_backupcodes/lib/Notifications/Notifier.php @@ -60,6 +60,9 @@ class Notifier implements INotifier { ); $notification->setLink($this->url->linkToRouteAbsolute('settings.PersonalSettings.index', ['section' => 'security'])); + + $notification->setIcon($this->url->getAbsoluteURL($this->url->imagePath('core', 'actions/password.svg'))); + return $notification; default: diff --git a/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php b/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php index 9a641eb9f85..0f03fba7de8 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php @@ -117,7 +117,7 @@ class NotifierTest extends TestCase { ->willReturnSelf(); $notification->expects($this->once()) ->method('setParsedMessage') - ->with('You have enabled two-factor authentication but have not yet generated backup codes. Be sure to do this in case you lose access to your second factor.') + ->with('You enabled two-factor authentication but did not generate backup codes yet. They are needed to restore access to your account in case you lose your second factor.') ->willReturnSelf(); $this->url->expects($this->once()) -- 2.39.5