Skip to content

Commit

Permalink
Merge pull request #24531 from nextcloud/backport/24516/stable20
Browse files Browse the repository at this point in the history
[stable20] Add icon to user limit notification
  • Loading branch information
MorrisJobke authored Dec 3, 2020
2 parents ff0d6c1 + 4c5662a commit 73f854d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions core/Notification/CoreNotifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,20 @@

namespace OC\Core\Notification;

use OCP\IURLGenerator;
use OCP\L10N\IFactory;
use OCP\Notification\INotification;
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;
}

/**
Expand Down Expand Up @@ -76,8 +80,9 @@ public function prepare(INotification $notification, string $languageCode): INot

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;
}

Expand Down

0 comments on commit 73f854d

Please sign in to comment.