From db8e57a72731027076f537ea484ea771fb18ebdb Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 26 Oct 2023 09:43:31 +0200 Subject: Don't duplicate notification warning Ref https://github.com/nextcloud/notifications/pull/1699 Signed-off-by: Joas Schilling --- apps/settings/lib/Controller/CheckSetupController.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'apps/settings/lib/Controller/CheckSetupController.php') diff --git a/apps/settings/lib/Controller/CheckSetupController.php b/apps/settings/lib/Controller/CheckSetupController.php index b2da455bc11..4d541be658f 100644 --- a/apps/settings/lib/Controller/CheckSetupController.php +++ b/apps/settings/lib/Controller/CheckSetupController.php @@ -190,6 +190,11 @@ class CheckSetupController extends Controller { * @return bool */ private function isFairUseOfFreePushService(): bool { + $rateLimitReached = (int) $this->config->getAppValue('notifications', 'rate_limit_reached', '0'); + if ($rateLimitReached >= (time() - 7 * 24 * 3600)) { + // Notifications app is showing a message already + return true; + } return $this->manager->isFairUseOfFreePushService(); } -- cgit v1.2.3