fix(notifications): Notifier::prepare() threw \InvalidArgumentException which is deprecated
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
@@ -16,6 +16,7 @@ use OCP\L10N\IFactory;
|
||||
use OCP\Notification\AlreadyProcessedException;
|
||||
use OCP\Notification\INotification;
|
||||
use OCP\Notification\INotifier;
|
||||
use OCP\Notification\UnknownNotificationException;
|
||||
|
||||
class Notifier implements INotifier {
|
||||
/** @var IFactory */
|
||||
@@ -77,7 +78,7 @@ class Notifier implements INotifier {
|
||||
public function prepare(INotification $notification, string $languageCode): INotification {
|
||||
$l = $this->l10nFactory->get('deck', $languageCode);
|
||||
if ($notification->getApp() !== 'deck') {
|
||||
throw new \InvalidArgumentException();
|
||||
throw new UnknownNotificationException();
|
||||
}
|
||||
$notification->setIcon($this->url->getAbsoluteURL($this->url->imagePath('deck', 'deck-dark.svg')));
|
||||
$params = $notification->getSubjectParameters();
|
||||
|
||||
Reference in New Issue
Block a user