]> source.dussan.org Git - nextcloud-server.git/commitdiff
Increase the fair-use push limit to 1.000 users 35251/head
authorJoas Schilling <coding@schilljs.com>
Fri, 18 Nov 2022 13:44:41 +0000 (14:44 +0100)
committerJoas Schilling <coding@schilljs.com>
Fri, 18 Nov 2022 14:39:23 +0000 (15:39 +0100)
Signed-off-by: Joas Schilling <coding@schilljs.com>
lib/private/Notification/Manager.php
tests/lib/Notification/ManagerTest.php

index d758cae428f295828d494670bf44a9351cbf4439..3d77f643d935f2c6b11c752e40fa6f5fd5cf549e 100644 (file)
@@ -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);
                }
index e482ba3876bea82c59069f95a3c5f2ea42f78529..a32eebcdb9547a38185d8450e06f8223413ee80c 100644 (file)
@@ -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],
                ];
        }