Skip to content

Commit

Permalink
Merge pull request #40 from nextcloud/fix/old-notifications
Browse files Browse the repository at this point in the history
Fix notifications
  • Loading branch information
julien-nc committed Feb 2, 2024
2 parents 5e135bc + 7b23469 commit a754ba5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/Notification/Notifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ public function prepare(INotification $notification, string $languageCode): INot
$l = $this->factory->get(Application::APP_ID, $languageCode);

$params = $notification->getSubjectParameters();
// ignore old notifications (before meta tasks were introduced)
// isset returns false if null
if (!isset($params['target'], $params['taskCategory'], $params['inputs'])) {
throw new InvalidArgumentException();
}
$schedulingAppId = $params['appId'];
$schedulingAppInfo = $this->appManager->getAppInfo($schedulingAppId);
if ($schedulingAppInfo === null) {
Expand Down

0 comments on commit a754ba5

Please sign in to comment.