Skip to content

Commit

Permalink
Add icon when supported
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen committed Oct 10, 2016
1 parent ea6810e commit 8635f02
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/BackgroundJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ protected function createPublicity($id, $authorId, $timeStamp, array $groups, ar
->setSubject('announced', [$authorId])
->setLink($this->urlGenerator->linkToRouteAbsolute('announcementcenter.page.index'));

// Nextcloud 11+
if (method_exists($notification, 'setIcon')) {
$notification->setIcon($this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('announcementcenter', 'announcementcenter-dark.svg')));
}

if (in_array('everyone', $groups)) {
$this->createPublicityEveryone($authorId, $event, $notification, $publicity);
} else {
Expand Down

0 comments on commit 8635f02

Please sign in to comment.