Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## 1.4.2

### Fixed

- Stop spamming the log with `\InvalidArgumentException` deprecation warnings from the notifier; throw `OCP\Notification\UnknownNotificationException` instead for unknown notifications.

## 1.4.1 - 2025-11-10

### Changed
Expand Down
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<description><![CDATA[Jira integration provides a dashboard widget displaying your important notifications,
a unified search provider to search for issues
and notifications about recent activity related to your assigned issues.]]></description>
<version>1.4.1</version>
<version>1.4.2</version>
<licence>agpl</licence>
<author>Julien Veyssier</author>
<namespace>Jira</namespace>
Expand Down
8 changes: 4 additions & 4 deletions lib/Notification/Notifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

namespace OCA\Jira\Notification;

use InvalidArgumentException;
use OCA\Jira\AppInfo\Application;
use OCP\IURLGenerator;
use OCP\IUserManager;
use OCP\L10N\IFactory;
use OCP\Notification\IManager as INotificationManager;
use OCP\Notification\INotification;
use OCP\Notification\INotifier;
use OCP\Notification\UnknownNotificationException;

class Notifier implements INotifier {

Expand Down Expand Up @@ -65,13 +65,13 @@ public function getName(): string {
* @param INotification $notification
* @param string $languageCode The code of the language that should be used to prepare the notification
* @return INotification
* @throws InvalidArgumentException When the notification was not prepared by a notifier
* @throws UnknownNotificationException When the notification was not prepared by a notifier
* @since 9.0.0
*/
public function prepare(INotification $notification, string $languageCode): INotification {
if ($notification->getApp() !== 'integration_jira') {
// Not my app => throw
throw new InvalidArgumentException();
throw new UnknownNotificationException();
}

$l = $this->factory->get('integration_jira', $languageCode);
Expand All @@ -95,7 +95,7 @@ public function prepare(INotification $notification, string $languageCode): INot

default:
// Unknown subject => Unknown notification => throw
throw new InvalidArgumentException();
throw new UnknownNotificationException();
}
}
}
Loading