diff options
Diffstat (limited to 'apps/updatenotification/lib')
-rw-r--r-- | apps/updatenotification/lib/Notification/Notifier.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/updatenotification/lib/Notification/Notifier.php b/apps/updatenotification/lib/Notification/Notifier.php index 3e1bc94425f..ccc2c2b6e29 100644 --- a/apps/updatenotification/lib/Notification/Notifier.php +++ b/apps/updatenotification/lib/Notification/Notifier.php @@ -24,6 +24,7 @@ namespace OCA\UpdateNotification\Notification; +use OCP\IURLGenerator; use OCP\L10N\IFactory; use OCP\Notification\IManager; use OCP\Notification\INotification; @@ -31,6 +32,9 @@ use OCP\Notification\INotifier; class Notifier implements INotifier { + /** @var IURLGenerator */ + protected $url; + /** @var IManager */ protected $notificationManager; @@ -43,10 +47,12 @@ class Notifier implements INotifier { /** * Notifier constructor. * + * @param IURLGenerator $url * @param IManager $notificationManager * @param IFactory $l10NFactory */ - public function __construct(IManager $notificationManager, IFactory $l10NFactory) { + public function __construct(IURLGenerator $url, IManager $notificationManager, IFactory $l10NFactory) { + $this->url = $url; $this->notificationManager = $notificationManager; $this->l10NFactory = $l10NFactory; $this->appVersions = $this->getAppVersions(); @@ -81,6 +87,8 @@ class Notifier implements INotifier { $notification->setParsedSubject($l->t('Update for %1$s to version %2$s is available.', [$appName, $notification->getObjectId()])); } + $notification->setIcon($this->url->getAbsoluteURL($this->url->imagePath('updatenotification', 'notification.svg'))); + return $notification; } |