summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-10-20 10:29:45 +0200
committerJoas Schilling <coding@schilljs.com>2021-10-23 00:54:50 +0200
commitb578a1e8b56f6b3ecf7dee837af6bd8265f9c0b0 (patch)
treee483d50ca038882c3521782aff6574eb0bda0f31 /lib/public
parent1895a6dc573cdb46cfa1987e25d45781623fdb7d (diff)
downloadnextcloud-server-b578a1e8b56f6b3ecf7dee837af6bd8265f9c0b0.tar.gz
nextcloud-server-b578a1e8b56f6b3ecf7dee837af6bd8265f9c0b0.zip
Fair use of push notifications
We want to keep offering our push notification service for free, but large users overload our infrastructure. For this reason we have to rate-limit the use of push notifications. If you need this feature, consider setting up your own push server or using Nextcloud Enterprise. Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/Notification/IManager.php12
-rw-r--r--lib/public/Support/Subscription/IRegistry.php4
2 files changed, 15 insertions, 1 deletions
diff --git a/lib/public/Notification/IManager.php b/lib/public/Notification/IManager.php
index 66fe78b723e..e2f37176850 100644
--- a/lib/public/Notification/IManager.php
+++ b/lib/public/Notification/IManager.php
@@ -107,4 +107,16 @@ interface IManager extends IApp, INotifier {
* @since 20.0.0
*/
public function flush(): void;
+
+ /**
+ * Whether the server can use the hosted push notification service
+ *
+ * We want to keep offering our push notification service for free, but large
+ * users overload our infrastructure. For this reason we have to rate-limit the
+ * use of push notifications. If you need this feature, consider setting up your
+ * own push server or using Nextcloud Enterprise.
+ *
+ * @since 23.0.0
+ */
+ public function isFairUseOfFreePushService(): bool;
}
diff --git a/lib/public/Support/Subscription/IRegistry.php b/lib/public/Support/Subscription/IRegistry.php
index 1082f12ab58..4a34cc91c5e 100644
--- a/lib/public/Support/Subscription/IRegistry.php
+++ b/lib/public/Support/Subscription/IRegistry.php
@@ -27,6 +27,7 @@ declare(strict_types=1);
*/
namespace OCP\Support\Subscription;
+use OCP\Notification\IManager;
use OCP\Support\Subscription\Exception\AlreadyRegisteredException;
/**
@@ -81,7 +82,8 @@ interface IRegistry {
/**
* Indicates if a hard user limit is reached and no new users should be created
*
+ * @param IManager|null $notificationManager
* @since 21.0.0
*/
- public function delegateIsHardUserLimitReached(): bool;
+ public function delegateIsHardUserLimitReached(?IManager $notificationManager = null): bool;
}