From d785c1e5207ce0fada7f7467127e5152d4c7aef8 Mon Sep 17 00:00:00 2001 From: Andrey Borysenko Date: Mon, 18 Mar 2024 14:26:13 +0200 Subject: [PATCH 1/2] fix: check subject earlier before ExApp check Signed-off-by: Andrey Borysenko --- lib/Notifications/ExAppAdminNotifier.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Notifications/ExAppAdminNotifier.php b/lib/Notifications/ExAppAdminNotifier.php index d450d7af..9bd60499 100644 --- a/lib/Notifications/ExAppAdminNotifier.php +++ b/lib/Notifications/ExAppAdminNotifier.php @@ -30,10 +30,11 @@ public function getName(): string { } public function prepare(INotification $notification, string $languageCode): INotification { + if ($notification->getSubject() !== 'ex_app_version_update') { + throw new InvalidArgumentException(); + } $exApp = $this->service->getExApp($notification->getApp()); - // TODO: Think about another possible admin ExApp notifications, make them unified - // TODO: Think about ExApp rich objects - if ($exApp === null || $notification->getSubject() !== 'ex_app_version_update') { + if ($exApp === null) { throw new InvalidArgumentException(); } if ($exApp->getEnabled()) { From 6c2b70dab2c3f3ed3f3ea2ba06af95454545a378 Mon Sep 17 00:00:00 2001 From: Andrey Borysenko Date: Mon, 18 Mar 2024 14:47:09 +0200 Subject: [PATCH 2/2] bump version, update changelog Signed-off-by: Andrey Borysenko --- CHANGELOG.md | 6 ++++++ appinfo/info.xml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 833a7aae..f16058dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [2.3.2 - 2024-03-xx] + +### Fixed + +- Fixed incorrect notifications handling producing a lot of errors in the log. #252 + ## [2.3.1 - 2024-03-18] ## Added diff --git a/appinfo/info.xml b/appinfo/info.xml index 7b86cd09..d2a90403 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -43,7 +43,7 @@ to join us in shaping a more versatile, stable, and secure app landscape. *Your insights, suggestions, and contributions are invaluable to us.* ]]> - 2.3.1 + 2.3.2 agpl Andrey Borysenko Alexander Piskun