diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-12-02 10:07:34 +0100 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2020-12-02 17:24:44 +0000 |
commit | a8780debd3d347132065007f558f37c41a898e05 (patch) | |
tree | 887e39f5ffe164f3a59b4645c2886b2d5b2a985a /core/Notification | |
parent | d2fd49c461ed6de7ab6f345ad3afa7c24ca25d90 (diff) | |
download | nextcloud-server-a8780debd3d347132065007f558f37c41a898e05.tar.gz nextcloud-server-a8780debd3d347132065007f558f37c41a898e05.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'); } } |