-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24511 from nextcloud/backport/23278/stable20
[stable20] Allow subscription to indicate that a userlimit is reached
- Loading branch information
Showing
11 changed files
with
259 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
* | ||
* @author Christoph Wurst <[email protected]> | ||
* @author Joas Schilling <[email protected]> | ||
* @author Morris Jobke <[email protected]> | ||
* @author Roeland Jago Douma <[email protected]> | ||
* | ||
* @license GNU AGPL version 3 or any later version | ||
|
@@ -32,7 +33,7 @@ | |
use OCP\Notification\INotification; | ||
use OCP\Notification\INotifier; | ||
|
||
class RemoveLinkSharesNotifier implements INotifier { | ||
class CoreNotifier implements INotifier { | ||
/** @var IFactory */ | ||
private $l10nFactory; | ||
|
||
|
@@ -73,6 +74,13 @@ public function prepare(INotification $notification, string $languageCode): INot | |
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'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.