diff options
author | Christoph Wurst <ChristophWurst@users.noreply.github.com> | 2020-12-03 09:58:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-03 09:58:28 +0100 |
commit | 0e99d3c1a022492b28823565fbcb24623521ab97 (patch) | |
tree | 0348c385167209c5873d49c60ee6cefee3d110ad | |
parent | 4d64ec9944e4bf7f04ca3ad60ca37164c9e10220 (diff) | |
parent | 2fb31e9b5dc3c7ee3220db3e7d5a335155367e40 (diff) | |
download | nextcloud-server-0e99d3c1a022492b28823565fbcb24623521ab97.tar.gz nextcloud-server-0e99d3c1a022492b28823565fbcb24623521ab97.zip |
Merge pull request #24516 from nextcloud/enh/23278/add-icon-for-notification
Add icon to user limit notification
-rw-r--r-- | core/Notification/CoreNotifier.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/core/Notification/CoreNotifier.php b/core/Notification/CoreNotifier.php index dd362dac8c1..709d83ab9c3 100644 --- a/core/Notification/CoreNotifier.php +++ b/core/Notification/CoreNotifier.php @@ -29,6 +29,7 @@ declare(strict_types=1); namespace OC\Core\Notification; +use OCP\IURLGenerator; use OCP\L10N\IFactory; use OCP\Notification\INotification; use OCP\Notification\INotifier; @@ -36,9 +37,12 @@ use OCP\Notification\INotifier; class CoreNotifier implements INotifier { /** @var IFactory */ private $l10nFactory; + /** @var IURLGenerator */ + private $url; - public function __construct(IFactory $factory) { + public function __construct(IFactory $factory, IURLGenerator $url) { $this->l10nFactory = $factory; + $this->url = $url; } /** @@ -76,8 +80,9 @@ class CoreNotifier implements INotifier { if ($notification->getSubject() === 'user_limit_reached') { $notification->setParsedSubject($l->t('The user limit of this instance is reached.')); - $notification->setParsedMessage($l->t('Add a subscription key to increase the user limit of this instance. For more information have a look at the Enterprise subscription page.')); - $notification->setLink('https://nextcloud.com/enterprise/order/'); + $notification->setParsedMessage($l->t('Enter your subscription key to increase the user limit. For more information about Nextcloud Enterprise see our website.')); + $notification->setLink('https://nextcloud.com/enterprise/'); + $notification->setIcon($this->url->getAbsoluteURL($this->url->imagePath('core', 'places/contacts.svg'))); return $notification; } |