diff options
author | Joas Schilling <coding@schilljs.com> | 2022-11-18 14:44:41 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2022-11-18 15:39:23 +0100 |
commit | d1f2e5e967884e148e2480e470d6886977c5941e (patch) | |
tree | 7341c954d59859990dcc2a9dc1c99228502f2f66 | |
parent | 473647a467d807703818f3d9f55352825a345bea (diff) | |
download | nextcloud-server-d1f2e5e967884e148e2480e470d6886977c5941e.tar.gz nextcloud-server-d1f2e5e967884e148e2480e470d6886977c5941e.zip |
Increase the fair-use push limit to 1.000 users
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r-- | lib/private/Notification/Manager.php | 2 | ||||
-rw-r--r-- | tests/lib/Notification/ManagerTest.php | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/Notification/Manager.php b/lib/private/Notification/Manager.php index d758cae428f..3d77f643d93 100644 --- a/lib/private/Notification/Manager.php +++ b/lib/private/Notification/Manager.php @@ -305,7 +305,7 @@ class Manager implements IManager { * users overload our infrastructure. For this reason we have to rate-limit the * use of push notifications. If you need this feature, consider using Nextcloud Enterprise. */ - $isFairUse = $this->subscription->delegateHasValidSubscription() || $this->userManager->countSeenUsers() < 500; + $isFairUse = $this->subscription->delegateHasValidSubscription() || $this->userManager->countSeenUsers() < 1000; $pushAllowed = $isFairUse ? 'yes' : 'no'; $this->cache->set('push_fair_use', $pushAllowed, 3600); } diff --git a/tests/lib/Notification/ManagerTest.php b/tests/lib/Notification/ManagerTest.php index e482ba3876b..a32eebcdb95 100644 --- a/tests/lib/Notification/ManagerTest.php +++ b/tests/lib/Notification/ManagerTest.php @@ -248,10 +248,10 @@ class ManagerTest extends TestCase { public function dataIsFairUseOfFreePushService(): array { return [ - [true, 499, true], - [true, 500, true], - [false, 499, true], - [false, 500, false], + [true, 999, true], + [true, 1000, true], + [false, 999, true], + [false, 1000, false], ]; } |