diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2019-03-20 10:05:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-20 10:05:45 +0100 |
commit | d211d5ef57f411a12582c52f521872f6e6550890 (patch) | |
tree | 6fe2988e3f8b933e4ac99c4b6bf44da2c13c570d /apps | |
parent | fa779fe75cb80ac253b31f75af1bab62632f5dd8 (diff) | |
parent | b0938d7d0dd019d3035857dedaf29ac05bf7fb9f (diff) | |
download | nextcloud-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.php | 10 |
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) { |