diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-12-02 10:07:34 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2020-12-02 15:20:03 +0100 |
commit | c0a05c0412e11fd80adc2059b28c8963ba4252dc (patch) | |
tree | a2d9542e302c7bae3e6c148de96e101cb7e69749 /core/Notification | |
parent | d87705a8941511a4e3bf8f6c97d6e0f36a42799e (diff) | |
download | nextcloud-server-c0a05c0412e11fd80adc2059b28c8963ba4252dc.tar.gz nextcloud-server-c0a05c0412e11fd80adc2059b28c8963ba4252dc.zip |
Add notification for user limit
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'core/Notification')
-rw-r--r-- | core/Notification/CoreNotifier.php (renamed from core/Notification/RemoveLinkSharesNotifier.php) | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/core/Notification/RemoveLinkSharesNotifier.php b/core/Notification/CoreNotifier.php index 52a71fced25..dd362dac8c1 100644 --- a/core/Notification/RemoveLinkSharesNotifier.php +++ b/core/Notification/CoreNotifier.php @@ -7,6 +7,7 @@ declare(strict_types=1); * * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @author Joas Schilling <coding@schilljs.com> + * @author Morris Jobke <hey@morrisjobke.de> * @author Roeland Jago Douma <roeland@famdouma.nl> * * @license GNU AGPL version 3 or any later version @@ -32,7 +33,7 @@ use OCP\L10N\IFactory; use OCP\Notification\INotification; use OCP\Notification\INotifier; -class RemoveLinkSharesNotifier implements INotifier { +class CoreNotifier implements INotifier { /** @var IFactory */ private $l10nFactory; @@ -73,6 +74,13 @@ class RemoveLinkSharesNotifier implements INotifier { return $notification; } + 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/'); + return $notification; + } + throw new \InvalidArgumentException('Invalid subject'); } } |