From a763c3d583a7cc7ee2a67810097c93a7031f46bf Mon Sep 17 00:00:00 2001 From: Josh Date: Tue, 24 Sep 2024 12:23:41 -0400 Subject: [PATCH] fix(notifications): Make action URLs absolute links to fix mobile and desktop Signed-off-by: Josh --- lib/BackgroundJobs/AdminNotification.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/BackgroundJobs/AdminNotification.php b/lib/BackgroundJobs/AdminNotification.php index 411756dc..a495531e 100644 --- a/lib/BackgroundJobs/AdminNotification.php +++ b/lib/BackgroundJobs/AdminNotification.php @@ -50,15 +50,17 @@ protected function run($argument): void { ->setSubject('updated') ->setObject('dummy', '23'); + $enableLink = $this->url->linkToOCSRouteAbsolute('survey_client.Endpoint.enableMonthly'); $enableAction = $notification->createAction(); $enableAction->setLabel('enable') - ->setLink($this->url->getAbsoluteURL('ocs/v2.php/apps/survey_client/api/v1/monthly'), 'POST') + ->setLink($enableLink, 'POST') ->setPrimary(true); $notification->addAction($enableAction); + $disableLink = $this->url->linkToOCSRouteAbsolute('survey_client.Endpoint.disableMonthly'); $disableAction = $notification->createAction(); $disableAction->setLabel('disable') - ->setLink($this->url->getAbsoluteURL('ocs/v2.php/apps/survey_client/api/v1/monthly'), 'DELETE') + ->setLink($disableLink, 'DELETE') ->setPrimary(false); $notification->addAction($disableAction);