Merge pull request #35251 from nextcloud/bugfix/noid/increase-fairuse-limit

Increase the fair-use push limit to 1.000 users
This commit is contained in:
Joas Schilling 2022-11-21 10:49:01 +01:00 committed by GitHub
commit fab277647e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View 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);
}

View 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],
];
}