aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Notification/Manager.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2018-07-13 10:11:41 +0200
committerJoas Schilling <coding@schilljs.com>2018-07-13 13:27:51 +0200
commit28d8d15a98df5adeec970b0cfc6fb50937aca8e2 (patch)
treee8dbcb7627ea092a55302b86a55cb3e5a7edcd9f /lib/private/Notification/Manager.php
parente3126fa091305a2325711d54d06a127283f27c56 (diff)
downloadnextcloud-server-28d8d15a98df5adeec970b0cfc6fb50937aca8e2.tar.gz
nextcloud-server-28d8d15a98df5adeec970b0cfc6fb50937aca8e2.zip
Allow notifiers to know whether we are preparing push notifications
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Notification/Manager.php')
-rw-r--r--lib/private/Notification/Manager.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/private/Notification/Manager.php b/lib/private/Notification/Manager.php
index bf0e8abadbb..69c24e4f9e4 100644
--- a/lib/private/Notification/Manager.php
+++ b/lib/private/Notification/Manager.php
@@ -53,6 +53,9 @@ class Manager implements IManager {
/** @var \Closure[] */
protected $notifiersInfoClosures;
+ /** @var bool */
+ protected $preparingPushNotification;
+
/**
* Manager constructor.
*
@@ -66,6 +69,7 @@ class Manager implements IManager {
$this->appsClosures = [];
$this->notifiersClosures = [];
$this->notifiersInfoClosures = [];
+ $this->preparingPushNotification = false;
}
/**
@@ -172,6 +176,22 @@ class Manager implements IManager {
}
/**
+ * @param bool $preparingPushNotification
+ * @since 14.0.0
+ */
+ public function setPreparingPushNotification($preparingPushNotification) {
+ $this->preparingPushNotification = $preparingPushNotification;
+ }
+
+ /**
+ * @return bool
+ * @since 14.0.0
+ */
+ public function isPreparingPushNotification(): bool {
+ return $this->preparingPushNotification;
+ }
+
+ /**
* @param INotification $notification
* @throws \InvalidArgumentException When the notification is not valid
* @since 8.2.0