summaryrefslogtreecommitdiffstats
path: root/apps/settings/lib/Controller/CheckSetupController.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-10-26 09:43:31 +0200
committerJoas Schilling <coding@schilljs.com>2023-10-26 09:46:28 +0200
commitdb8e57a72731027076f537ea484ea771fb18ebdb (patch)
treece6170f0dafe4f61f1f320852d7ba8125d430e66 /apps/settings/lib/Controller/CheckSetupController.php
parent33c1aafc2eb1480e4c047fabe49a3e168d27e1d8 (diff)
downloadnextcloud-server-db8e57a72731027076f537ea484ea771fb18ebdb.tar.gz
nextcloud-server-db8e57a72731027076f537ea484ea771fb18ebdb.zip
Don't duplicate notification warning
Ref https://github.com/nextcloud/notifications/pull/1699 Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/settings/lib/Controller/CheckSetupController.php')
-rw-r--r--apps/settings/lib/Controller/CheckSetupController.php5
1 files changed, 5 insertions, 0 deletions
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();
}