Skip to content

Commit d1f2e5e

Browse files
committed
Increase the fair-use push limit to 1.000 users
Signed-off-by: Joas Schilling <coding@schilljs.com>
1 parent 473647a commit d1f2e5e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/private/Notification/Manager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ public function isFairUseOfFreePushService(): bool {
305305
* users overload our infrastructure. For this reason we have to rate-limit the
306306
* use of push notifications. If you need this feature, consider using Nextcloud Enterprise.
307307
*/
308-
$isFairUse = $this->subscription->delegateHasValidSubscription() || $this->userManager->countSeenUsers() < 500;
308+
$isFairUse = $this->subscription->delegateHasValidSubscription() || $this->userManager->countSeenUsers() < 1000;
309309
$pushAllowed = $isFairUse ? 'yes' : 'no';
310310
$this->cache->set('push_fair_use', $pushAllowed, 3600);
311311
}

tests/lib/Notification/ManagerTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,10 @@ public function testGetCount(): void {
248248

249249
public function dataIsFairUseOfFreePushService(): array {
250250
return [
251-
[true, 499, true],
252-
[true, 500, true],
253-
[false, 499, true],
254-
[false, 500, false],
251+
[true, 999, true],
252+
[true, 1000, true],
253+
[false, 999, true],
254+
[false, 1000, false],
255255
];
256256
}
257257

0 commit comments

Comments
 (0)