Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Increase the fair-use push limit to 1.000 users
Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen authored and backportbot-nextcloud[bot] committed Nov 21, 2022
commit 30e72fe180a7514e1ea4a47cec1137f7ec7e8d45
2 changes: 1 addition & 1 deletion lib/private/Notification/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ public function isFairUseOfFreePushService(): bool {
* 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);
}
Expand Down
8 changes: 4 additions & 4 deletions tests/lib/Notification/ManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,10 @@ public function testGetCount(): void {

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

Expand Down