Skip to content

Commit

Permalink
fix: notifications link for mobile / desktop
Browse files Browse the repository at this point in the history
Fixes #316 

Signed-off-by: Josh <josh.t.richards@gmail.com>
  • Loading branch information
joshtrichards authored Sep 24, 2024
1 parent ba4dac1 commit 70bc6a4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/BackgroundJobs/AdminNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,17 @@ protected function run($argument): void {
->setSubject('updated')
->setObject('dummy', '23');

$enableLink = $this->url->getAbsoluteURL($this->url->linkTo('', 'ocs/v2.php/apps/survey_client/api/v1/monthly'), 'POST'));

Check failure on line 39 in lib/BackgroundJobs/AdminNotification.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

TooManyArguments

lib/BackgroundJobs/AdminNotification.php:39:29: TooManyArguments: Too many arguments for method OCP\IURLGenerator::getabsoluteurl - saw 2 (see https://psalm.dev/026)

Check failure on line 39 in lib/BackgroundJobs/AdminNotification.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

ParseError

lib/BackgroundJobs/AdminNotification.php:39:123: ParseError: Syntax error, unexpected ')' on line 39 (see https://psalm.dev/173)
$enableAction = $notification->createAction();
$enableAction->setLabel('enable')
->setLink($this->url->getAbsoluteURL('ocs/v2.php/apps/survey_client/api/v1/monthly'), 'POST')
->setLink($enableLink)

Check failure on line 42 in lib/BackgroundJobs/AdminNotification.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

TooFewArguments

lib/BackgroundJobs/AdminNotification.php:42:6: TooFewArguments: Too few arguments for OCP\Notification\IAction::setLink - expecting requestType to be passed (see https://psalm.dev/025)

Check failure on line 42 in lib/BackgroundJobs/AdminNotification.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

TooFewArguments

lib/BackgroundJobs/AdminNotification.php:42:6: TooFewArguments: Too few arguments for method OCP\Notification\IAction::setlink saw 1 (see https://psalm.dev/025)
->setPrimary(true);
$notification->addAction($enableAction);

$disableLink = $this->url->getAbsoluteURL($this->url->linkTo('', 'ocs/v2.php/apps/survey_client/api/v1/monthly'), 'DELETE'));

Check failure on line 46 in lib/BackgroundJobs/AdminNotification.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

TooManyArguments

lib/BackgroundJobs/AdminNotification.php:46:30: TooManyArguments: Too many arguments for method OCP\IURLGenerator::getabsoluteurl - saw 2 (see https://psalm.dev/026)

Check failure on line 46 in lib/BackgroundJobs/AdminNotification.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

ParseError

lib/BackgroundJobs/AdminNotification.php:46:126: ParseError: Syntax error, unexpected ')' on line 46 (see https://psalm.dev/173)
$disableAction = $notification->createAction();
$disableAction->setLabel('disable')
->setLink($this->url->getAbsoluteURL('ocs/v2.php/apps/survey_client/api/v1/monthly'), 'DELETE')
->setLink($disableLink)

Check failure on line 49 in lib/BackgroundJobs/AdminNotification.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

TooFewArguments

lib/BackgroundJobs/AdminNotification.php:49:6: TooFewArguments: Too few arguments for OCP\Notification\IAction::setLink - expecting requestType to be passed (see https://psalm.dev/025)

Check failure on line 49 in lib/BackgroundJobs/AdminNotification.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

TooFewArguments

lib/BackgroundJobs/AdminNotification.php:49:6: TooFewArguments: Too few arguments for method OCP\Notification\IAction::setlink saw 1 (see https://psalm.dev/025)
->setPrimary(false);
$notification->addAction($disableAction);

Expand Down

0 comments on commit 70bc6a4

Please sign in to comment.