Skip to content

Commit

Permalink
Merge pull request #43 from nextcloud/notification-icon-support
Browse files Browse the repository at this point in the history
Add icon when supported
  • Loading branch information
nickvergessen authored Oct 10, 2016
2 parents 428d241 + 8635f02 commit 154199d
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 154199d

Please sign in to comment.