Skip to content
Closed
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: 2 additions & 4 deletions lib/Notification/Notifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,11 @@ public function getName(): string {
}

private function createNotificationException(string $message): \Exception {
return class_exists(UnknownNotificationException::class)
? new UnknownNotificationException($message)
: new \InvalidArgumentException($message);
return new UnknownNotificationException($message);
}

/**
* @throws \InvalidArgumentException When the notification was not prepared by a notifier
* @throws \OCP\Notification\UnknownNotificationException When the notification is not known
*/
public function prepare(INotification $notification, string $languageCode): INotification {
if ($notification->getApp() !== Application::APP_ID) {
Expand Down