diff options
author | Louis <6653109+artonge@users.noreply.github.com> | 2022-08-17 14:14:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-17 14:14:03 +0200 |
commit | a2d145734ab0548cb1376a818415d5d1342fe665 (patch) | |
tree | 19b403997b955f32708920cedfcf80485af6f9dc /lib | |
parent | 312b719acf686f51065e83290cd88704d703a50c (diff) | |
parent | 227c766f162db5b0e9b221930dfbb48022933038 (diff) | |
download | nextcloud-server-a2d145734ab0548cb1376a818415d5d1342fe665.tar.gz nextcloud-server-a2d145734ab0548cb1376a818415d5d1342fe665.zip |
Merge pull request #33565 from nextcloud/debt/remove_todo_push_service_fairuse
Remove time check in isFairUseOfFreePushService
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Notification/Manager.php | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/private/Notification/Manager.php b/lib/private/Notification/Manager.php index c707884355b..148ad3e912d 100644 --- a/lib/private/Notification/Manager.php +++ b/lib/private/Notification/Manager.php @@ -27,7 +27,6 @@ declare(strict_types=1); namespace OC\Notification; use OC\AppFramework\Bootstrap\Coordinator; -use OCP\AppFramework\Utility\ITimeFactory; use OCP\ICache; use OCP\ICacheFactory; use OCP\IUserManager; @@ -50,8 +49,6 @@ class Manager implements IManager { private $userManager; /** @var ICache */ protected $cache; - /** @var ITimeFactory */ - protected $timeFactory; /** @var IRegistry */ protected $subscription; /** @var LoggerInterface */ @@ -79,14 +76,12 @@ class Manager implements IManager { public function __construct(IValidator $validator, IUserManager $userManager, ICacheFactory $cacheFactory, - ITimeFactory $timeFactory, IRegistry $subscription, LoggerInterface $logger, Coordinator $coordinator) { $this->validator = $validator; $this->userManager = $userManager; $this->cache = $cacheFactory->createDistributed('notifications'); - $this->timeFactory = $timeFactory; $this->subscription = $subscription; $this->logger = $logger; $this->coordinator = $coordinator; @@ -310,10 +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. */ - // TODO Remove time check after 1st March 2022 - $isFairUse = $this->timeFactory->getTime() < 1646089200 - || $this->subscription->delegateHasValidSubscription() - || $this->userManager->countSeenUsers() < 5000; + $isFairUse = $this->subscription->delegateHasValidSubscription() || $this->userManager->countSeenUsers() < 5000; $pushAllowed = $isFairUse ? 'yes' : 'no'; $this->cache->set('push_fair_use', $pushAllowed, 3600); } |