aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-03-20 10:05:45 +0100
committerGitHub <noreply@github.com>2019-03-20 10:05:45 +0100
commitd211d5ef57f411a12582c52f521872f6e6550890 (patch)
tree6fe2988e3f8b933e4ac99c4b6bf44da2c13c570d /apps
parentfa779fe75cb80ac253b31f75af1bab62632f5dd8 (diff)
parentb0938d7d0dd019d3035857dedaf29ac05bf7fb9f (diff)
downloadnextcloud-server-d211d5ef57f411a12582c52f521872f6e6550890.tar.gz
nextcloud-server-d211d5ef57f411a12582c52f521872f6e6550890.zip
Merge pull request #14749 from nextcloud/backport/14744/stable15
[stable15] Always register the Notifier
Diffstat (limited to 'apps')
-rw-r--r--apps/updatenotification/lib/AppInfo/Application.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/updatenotification/lib/AppInfo/Application.php b/apps/updatenotification/lib/AppInfo/Application.php
index 369b6e3f07d..14512bae838 100644
--- a/apps/updatenotification/lib/AppInfo/Application.php
+++ b/apps/updatenotification/lib/AppInfo/Application.php
@@ -44,17 +44,17 @@ class Application extends App {
return;
}
+ // Always register the notifier, so background jobs (without a user) can send push notifications
+ $this->registerNotifier();
+
$user = $server->getUserSession()->getUser();
if (!$user instanceof IUser) {
// Nothing to do for guests
return;
}
- if ($server->getAppManager()->isEnabledForUser('notifications')) {
- // Notifications app is available, so we register.
- // Since notifications also work for non-admins we don't check this here.
- $this->registerNotifier();
- } else if ($server->getGroupManager()->isAdmin($user->getUID())) {
+ if (!$server->getAppManager()->isEnabledForUser('notifications') &&
+ $server->getGroupManager()->isAdmin($user->getUID())) {
try {
$updateChecker = $this->getContainer()->query(UpdateChecker::class);
} catch (QueryException $e) {