Skip to content

Commit 47036c0

Browse files
fix: use absolute URL in notifications (#317)
* fix: use absolute URL in notifications Fixes #270 Signed-off-by: Josh <josh.t.richards@gmail.com> * chore: fixup typo (oops) Signed-off-by: Josh <josh.t.richards@gmail.com> --------- Signed-off-by: Josh <josh.t.richards@gmail.com>
1 parent 0da31b2 commit 47036c0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/Notification/Notifier.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,16 @@ public function prepare(INotification $notification, string $languageCode): INot
6363
break;
6464
}
6565

66-
$link = $this->url->getWebroot() . '/settings/user/ai';
66+
$link = $this->url->linkToRouteAbsolute('settings.PersonalSettings.index', ['section' => 'ai']);
6767
$iconUrl = $this->url->getAbsoluteURL($this->url->imagePath(Application::APP_ID, 'app-dark.svg'));
6868

69-
$notification
70-
->setParsedSubject($subject)
69+
$notification->setParsedSubject($subject)
7170
->setParsedMessage($content)
7271
->setLink($link)
7372
->setIcon($iconUrl);
7473

7574
$actionLabel = $params['actionLabel'] ?? $l->t('View quota');
75+
7676
$action = $notification->createAction();
7777
$action->setLabel($actionLabel)
7878
->setParsedLabel($actionLabel)

0 commit comments

Comments
 (0)