From 5acfac71b05cdd0acf08ac4515e244699f59d87f Mon Sep 17 00:00:00 2001 From: Joas Schilling <213943+nickvergessen@users.noreply.github.com> Date: Tue, 9 Apr 2024 15:04:00 +0200 Subject: [PATCH] =?UTF-8?q?fix(notifications):=20Make=20the=20notification?= =?UTF-8?q?=20icons=20absolute=20URLs=20so=20they=E2=80=A6=20(#268)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … work in clients Signed-off-by: Joas Schilling --- lib/Notifications/ExAppAdminNotifier.php | 2 +- lib/Notifications/ExAppNotifier.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Notifications/ExAppAdminNotifier.php b/lib/Notifications/ExAppAdminNotifier.php index 9bd60499..8b688f6e 100644 --- a/lib/Notifications/ExAppAdminNotifier.php +++ b/lib/Notifications/ExAppAdminNotifier.php @@ -44,7 +44,7 @@ public function prepare(INotification $notification, string $languageCode): INot $parameters = $notification->getSubjectParameters(); $notification->setLink($this->url->getAbsoluteURL('/index.php/settings/admin/' . Application::APP_ID)); - $notification->setIcon($this->url->imagePath(Application::APP_ID, 'app-dark.svg')); + $notification->setIcon($this->url->getAbsoluteURL($this->url->imagePath(Application::APP_ID, 'app-dark.svg'))); if (isset($parameters['rich_subject']) && isset($parameters['rich_subject_params'])) { $notification->setRichSubject($parameters['rich_subject'], $parameters['rich_subject_params']); diff --git a/lib/Notifications/ExAppNotifier.php b/lib/Notifications/ExAppNotifier.php index 11e0266f..e8cbd81b 100644 --- a/lib/Notifications/ExAppNotifier.php +++ b/lib/Notifications/ExAppNotifier.php @@ -47,7 +47,7 @@ public function prepare(INotification $notification, string $languageCode): INot if (isset($parameters['link']) && $parameters['link'] !== '') { $notification->setLink($parameters['link']); } - $notification->setIcon($this->url->imagePath(Application::APP_ID, 'app-dark.svg')); + $notification->setIcon($this->url->getAbsoluteURL($this->url->imagePath(Application::APP_ID, 'app-dark.svg'))); if (isset($parameters['rich_subject']) && isset($parameters['rich_subject_params'])) { $notification->setRichSubject($l->t($parameters['rich_subject']), $parameters['rich_subject_params']);