зеркало из https://github.com/nextcloud/deck.git
Merge pull request #6623 from nextcloud/bugfix/noid/notification-handling
fix(notifications): Notifier::prepare() threw \InvalidArgumentExcepti…
This commit is contained in:
Коммит
989db86f83
|
@ -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();
|
||||
|
|
Загрузка…
Ссылка в новой задаче