Skip to content

Commit a28e297

Browse files
committed
update notifications for one-click instances
Signed-off-by: szaimen <szaimen@e.mail.de>
1 parent d48a637 commit a28e297

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

core/Notification/CoreNotifier.php

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,17 @@ public function prepare(INotification $notification, string $languageCode): INot
7878
}
7979

8080
if ($notification->getSubject() === 'user_limit_reached') {
81-
$notification->setParsedSubject($l->t('The user limit of this instance is reached.'));
82-
$notification->setParsedMessage($l->t('Enter your subscription key to increase the user limit. For more information about Nextcloud Enterprise see our website.'));
83-
$notification->setLink('https://nextcloud.com/enterprise/');
81+
$notification->setParsedSubject($l->t('Nextcloud Enterprise subscription needed for more users'));
82+
$notification->setParsedMessage($l->t('Enter your subscription key in the support app in order to increase the user limit. This will also grant you all additional benefits that Nextcloud Enterprise offers and is highly recommended for the operation in companies.'));
8483
$notification->setIcon($this->url->getAbsoluteURL($this->url->imagePath('core', 'places/contacts.svg')));
84+
$action = $notification->createAction();
85+
$label = $l->t('Learn more ↗');
86+
$link = 'https://nextcloud.com/enterprise/';
87+
$action->setLabel($label)
88+
->setParsedLabel($label)
89+
->setLink($link, IAction::TYPE_WEB)
90+
->setPrimary(true);
91+
$notification->addParsedAction($action);
8592
return $notification;
8693
}
8794

lib/private/User/Manager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ public function createUser($uid, $password) {
397397
$notificationManager = \OC::$server->get(IManager::class);
398398
if ($registry->delegateIsHardUserLimitReached($notificationManager)) {
399399
$l = \OC::$server->getL10N('lib');
400-
throw new HintException($l->t('The user limit has been reached and the user was not created.'));
400+
throw new HintException($l->t('Nextcloud Enterprise subscription needed for more users. Check your notifications to learn more.'));
401401
}
402402

403403
$localBackends = [];

0 commit comments

Comments
 (0)